[mangadex] add 'api-server' option (#1309)
and change the API server back to 'https://mangadex.org/api' for now
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user