1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 11:12:40 +01:00

[exhentai] improve 509.gif detection (#2901)

This commit is contained in:
Mike Fährmann 2022-09-09 12:10:55 +02:00
parent bdad9c40dd
commit 8b76149521
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -328,8 +328,13 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
data["image_token"] = self.key["start"] = extr('var startkey="', '";') data["image_token"] = self.key["start"] = extr('var startkey="', '";')
self.key["show"] = extr('var showkey="', '";') self.key["show"] = extr('var showkey="', '";')
if iurl.endswith("g/509.gif"): # full 509.gif URLs
# - https://exhentai.org/img/509.gif
# - https://ehgt.org/g/509.gif
if iurl.endswith(("hentai.org/img/509.gif",
"ehgt.org/g/509.gif")):
self._report_limits(data) self._report_limits(data)
return url, text.nameext_from_url(iurl, data) return url, text.nameext_from_url(iurl, data)
def images_from_api(self): def images_from_api(self):
@ -365,7 +370,8 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
data["num"] = request["page"] data["num"] = request["page"]
data["image_token"] = imgkey data["image_token"] = imgkey
if imgurl.endswith("g/509.gif"): if imgurl.endswith(("hentai.org/img/509.gif",
"ehgt.org/g/509.gif")):
self._report_limits(data) self._report_limits(data)
yield url, text.nameext_from_url(imgurl, data) yield url, text.nameext_from_url(imgurl, data)