[rule34us] prioritize 'video.rule34.us' for video downloads (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-2999111612
This commit is contained in:
@@ -40,7 +40,8 @@ class Rule34usExtractor(BooruExtractor):
|
||||
|
||||
url = post["file_url"]
|
||||
if "//video-cdn1." in url:
|
||||
post["_fallback"] = (url.replace("//video-cdn1.", "//video."),)
|
||||
post["file_url"] = url.replace("//video-cdn1.", "//video.")
|
||||
post["_fallback"] = (url,)
|
||||
post["md5"] = url.rpartition("/")[2].partition(".")[0]
|
||||
|
||||
tags = collections.defaultdict(list)
|
||||
|
||||
@@ -28,8 +28,9 @@ __tests__ = (
|
||||
"#url" : "https://rule34.us/index.php?r=posts/view&id=4576310",
|
||||
"#category": ("booru", "rule34us", "post"),
|
||||
"#class" : rule34us.Rule34usPostExtractor,
|
||||
"#pattern" : r"https://video-cdn\d\.rule34\.us/images/a2/94/a294ff8e1f8e0efa041e5dc9d1480011\.mp4",
|
||||
"#results" : "https://video.rule34.us/images/a2/94/a294ff8e1f8e0efa041e5dc9d1480011.mp4",
|
||||
|
||||
"_fallback" : ("https://video-cdn1.rule34.us/images/a2/94/a294ff8e1f8e0efa041e5dc9d1480011.mp4",),
|
||||
"extension" : "mp4",
|
||||
"file_url" : str,
|
||||
"filename" : "a294ff8e1f8e0efa041e5dc9d1480011",
|
||||
|
||||
Reference in New Issue
Block a user