mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 03:02:50 +01:00
[mangadex] add 'api-server' option (#1309)
and change the API server back to 'https://mangadex.org/api' for now
This commit is contained in:
parent
96a51ff169
commit
79c0fc249b
@ -17,7 +17,6 @@ class MangadexExtractor(Extractor):
|
||||
"""Base class for mangadex extractors"""
|
||||
category = "mangadex"
|
||||
root = "https://mangadex.org"
|
||||
api_root = "https://api.mangadex.org"
|
||||
|
||||
# mangadex-to-iso639-1 codes
|
||||
iso639_map = {
|
||||
@ -27,6 +26,10 @@ class MangadexExtractor(Extractor):
|
||||
"vn": "vi",
|
||||
}
|
||||
|
||||
def __init__(self, match):
|
||||
Extractor.__init__(self, match)
|
||||
self.api_root = self.config("api-server") or "https://mangadex.org/api"
|
||||
|
||||
def chapter_data(self, chapter_id):
|
||||
"""Request API results for 'chapter_id'"""
|
||||
url = "{}/v2/chapter/{}".format(self.api_root, chapter_id)
|
||||
|
Loading…
Reference in New Issue
Block a user