From 1c36e65e9ba44d39356878f71115bc62b9306500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 31 May 2019 15:34:39 +0200 Subject: [PATCH] [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. --- gallery_dl/extractor/exhentai.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py index 26243a54..d67c58a6 100644 --- a/gallery_dl/extractor/exhentai.py +++ b/gallery_dl/extractor/exhentai.py @@ -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/"), )