[rule34us] add fallback for 'video-cdn1' videos (#4985)
This commit is contained in:
@@ -38,7 +38,11 @@ class Rule34usExtractor(BooruExtractor):
|
|||||||
"height" : extr(' x ', 'h'),
|
"height" : extr(' x ', 'h'),
|
||||||
"file_url": extr(' src="', '"'),
|
"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)
|
tags = collections.defaultdict(list)
|
||||||
for tag_type, tag_name in self._find_tags(page):
|
for tag_type, tag_name in self._find_tags(page):
|
||||||
|
|||||||
Reference in New Issue
Block a user