[mangadex] use 'api.mangadex.org' as default API server

The caching issues seem to be gone.
(#1290, #1310)
This commit is contained in:
Mike Fährmann
2021-02-28 01:31:50 +01:00
parent fc15930266
commit e58039358d
2 changed files with 15 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ 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 = {
@@ -28,7 +29,10 @@ class MangadexExtractor(Extractor):
def __init__(self, match):
Extractor.__init__(self, match)
self.api_root = self.config("api-server") or "https://mangadex.org/api"
server = self.config("api-server")
if server is not None:
self.api_root = server.rstrip("/")
def chapter_data(self, chapter_id):
"""Request API results for 'chapter_id'"""