[sankaku][idolcomplex] fix download URLs (#8666)
This commit is contained in:
@@ -61,8 +61,8 @@ class SankakuExtractor(BooruExtractor):
|
||||
self.log.warning(
|
||||
"Login required to download 'contentious_content' posts")
|
||||
SankakuExtractor._warning = False
|
||||
elif url[8] == "v":
|
||||
url = "https://s.sankakucomplex.com" + url[url.index("/", 8):]
|
||||
elif url[4] != "s":
|
||||
url = "https" + url[4:]
|
||||
return url
|
||||
|
||||
def _prepare(self, post):
|
||||
|
||||
@@ -13,7 +13,7 @@ __tests__ = (
|
||||
"#url" : "https://www.idolcomplex.com/en/posts?tags=lyumos",
|
||||
"#category": ("booru", "idolcomplex", "tag"),
|
||||
"#class" : idolcomplex.IdolcomplexTagExtractor,
|
||||
"#pattern" : r"https://i[sv]\.sankakucomplex\.com/o/[^/]{2}/[^/]{2}/[^/]{32}\.\w+\?e=\d+&m=[^&#]+",
|
||||
"#pattern" : r"https://i[sv]\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}/[^/]{32}\.\w+\?e=\d+&.+",
|
||||
"#range" : "18-22",
|
||||
"#count" : 5,
|
||||
},
|
||||
@@ -67,9 +67,9 @@ __tests__ = (
|
||||
"#class" : idolcomplex.IdolcomplexPoolExtractor,
|
||||
"#auth" : True,
|
||||
"#pattern" : (
|
||||
r"https://is.sankakucomplex.com/o/50/9e/509eccbba54a43cea6b275a65b93c51d\.jpg\?e=\d+&m=.+",
|
||||
r"https://is.sankakucomplex.com/o/cf/ae/cfae655b594634126bddc10ba7965485\.jpg\?e=\d+&m=.+",
|
||||
r"https://is.sankakucomplex.com/o/53/b3/53b3d915a79ac72747455f4d0e843fc0\.jpg\?e=\d+&m=.+",
|
||||
r"https://iv.sankakucomplex.com/data/50/9e/509eccbba54a43cea6b275a65b93c51d\.jpg\?e=\d+&expires=\d+&m=.+",
|
||||
r"https://iv.sankakucomplex.com/data/cf/ae/cfae655b594634126bddc10ba7965485\.jpg\?e=\d+&expires=\d+&m=.+",
|
||||
r"https://iv.sankakucomplex.com/data/53/b3/53b3d915a79ac72747455f4d0e843fc0\.jpg\?e=\d+&expires=\d+&m=.+",
|
||||
),
|
||||
},
|
||||
|
||||
@@ -117,7 +117,7 @@ __tests__ = (
|
||||
"file_ext" : "jpg",
|
||||
"file_size" : 97521,
|
||||
"file_type" : "image/jpeg",
|
||||
"file_url" : r"re:https://is.sankakucomplex.com/o/50/9e/509eccbba54a43cea6b275a65b93c51d.jpg\?e=\d+&m=.+",
|
||||
"file_url" : r"re:https?://iv.sankakucomplex.com/data/50/9e/509eccbba54a43cea6b275a65b93c51d.jpg\?e=\d+&.+",
|
||||
"filename" : "509eccbba54a43cea6b275a65b93c51d",
|
||||
"generation_directives": None,
|
||||
"gif_preview_url" : None,
|
||||
@@ -137,13 +137,13 @@ __tests__ = (
|
||||
"md5" : "509eccbba54a43cea6b275a65b93c51d",
|
||||
"parent_id" : None,
|
||||
"preview_height" : 400,
|
||||
"preview_url" : r"re:https://is.sankakucomplex.com/p/50/9e/509eccbba54a43cea6b275a65b93c51d.avif\?e=\d+&m=.+",
|
||||
"preview_url" : r"re:https?://iv.sankakucomplex.com/data/preview/50/9e/509eccbba54a43cea6b275a65b93c51d.avif\?e=\d+&.+",
|
||||
"preview_width" : 600,
|
||||
"rating" : "s",
|
||||
"reactions" : [],
|
||||
"redirect_to_signup": False,
|
||||
"sample_height" : 683,
|
||||
"sample_url" : r"re:https://is.sankakucomplex.com/o/50/9e/509eccbba54a43cea6b275a65b93c51d.jpg\?e=\d+&m=.+",
|
||||
"sample_url" : r"re:https?://iv.sankakucomplex.com/data/50/9e/509eccbba54a43cea6b275a65b93c51d.jpg\?e=\d+&.+",
|
||||
"sample_width" : 1024,
|
||||
"sequence" : None,
|
||||
"source" : "removed",
|
||||
|
||||
Reference in New Issue
Block a user