[rule34us] add fallback for 'video-cdn1' videos (#4985)

pull/5016/head
Mike Fährmann 9 months ago
parent caceb14fc2
commit 00d83d9588
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -38,7 +38,11 @@ class Rule34usExtractor(BooruExtractor):
"height" : extr(' x ', 'h'),
"file_url": extr(' src="', '"'),
}
post["md5"] = post["file_url"].rpartition("/")[2].partition(".")[0]
url = post["file_url"]
if "//video-cdn1." in url:
post["_fallback"] = (url.replace("//video-cdn1.", "//video."),)
post["md5"] = url.rpartition("/")[2].partition(".")[0]
tags = collections.defaultdict(list)
for tag_type, tag_name in self._find_tags(page):

Loading…
Cancel
Save