Skip to content

Commit

Permalink
[exhentai] choose site version depending on input URL (#278)
Browse files Browse the repository at this point in the history
Use e-hentai.org as root and cookiedomain if the input URL is from
e-hentai (or g.e-hentai), use exhentai.org otherwise.
  • Loading branch information
mikf committed May 31, 2019
1 parent 6da3e21 commit 1c36e65
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gallery_dl/extractor/exhentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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/"),
)

Expand Down

0 comments on commit 1c36e65

Please sign in to comment.