mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 12:12:34 +01:00
[exhentai] add 'domain' option (#897)
This commit is contained in:
parent
45c32213dc
commit
ecaecc4064
@ -726,6 +726,18 @@ Description Minimum wait time in seconds before API requests.
|
||||
=========== =====
|
||||
|
||||
|
||||
extractor.exhentai.domain
|
||||
-------------------------
|
||||
=========== =====
|
||||
Type ``string``
|
||||
Default ``"auto"``
|
||||
Description * ``"auto"``: Use ``e-hentai.org`` or ``exhentai.org``
|
||||
depending on the input URL
|
||||
* ``"e-hentai.org"``: Use ``e-hentai.org`` for all URLs
|
||||
* ``"exhentai.org"``: Use ``exhentai.org`` for all URLs
|
||||
=========== =====
|
||||
|
||||
|
||||
extractor.exhentai.limits
|
||||
-------------------------
|
||||
=========== =====
|
||||
|
@ -44,6 +44,8 @@
|
||||
{
|
||||
"username": null,
|
||||
"password": null,
|
||||
"domain": "auto",
|
||||
"limits": true,
|
||||
"original": true,
|
||||
"wait-min": 3.0,
|
||||
"wait-max": 6.0
|
||||
|
@ -35,9 +35,12 @@ class ExhentaiExtractor(Extractor):
|
||||
|
||||
def __init__(self, match):
|
||||
version = match.group(1)
|
||||
if version != "ex":
|
||||
self.root = "https://e-hentai.org"
|
||||
self.cookiedomain = ".e-hentai.org"
|
||||
domain = self.config("domain", "auto")
|
||||
if domain == "auto":
|
||||
domain = ("ex" if version == "ex" else "e-") + "hentai.org"
|
||||
self.root = "https://" + domain
|
||||
self.cookiedomain = "." + domain
|
||||
|
||||
Extractor.__init__(self, match)
|
||||
self.limits = self.config("limits", True)
|
||||
self.original = self.config("original", True)
|
||||
|
Loading…
Reference in New Issue
Block a user