1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[exhentai] choose site version depending on input URL (#278)

Use e-hentai.org as root and cookiedomain if the input URL is from
e-hentai (or g.e-hentai), use exhentai.org otherwise.
This commit is contained in:
Mike Fährmann 2019-05-31 15:34:39 +02:00
parent 6da3e21237
commit 1c36e65e9b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -32,6 +32,9 @@ class ExhentaiExtractor(Extractor):
root = "https://exhentai.org"
def __init__(self, match):
if match.group(1) != "ex":
self.root = "https://e-hentai.org"
self.cookiedomain = ".e-hentai.org"
Extractor.__init__(self, match)
self.limits = self.config("limits", True)
self.original = self.config("original", True)
@ -122,7 +125,9 @@ class ExhentaiGalleryExtractor(ExhentaiExtractor):
("https://exhentai.org/s/3957343c3b/960460-5", {
"count": 2,
}),
("https://e-hentai.org/g/960460/4f0e369d82/"),
("https://e-hentai.org/s/3957343c3b/960460-5", {
"count": 2,
}),
("https://g.e-hentai.org/g/960460/4f0e369d82/"),
)