diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index 8f3b2b2fa6..f65ac2826b 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -122,7 +122,7 @@ class DeviantartFavoriteExtractor(DeviantartExtractor): }), ("http://rosuuri.deviantart.com/favourites/58951174/Useful", { "url": "9e8d971c80db099b95d1c785399e2bc6eb96cd07", - "keyword": "ea42a4e238f7e54caa250fa2f5abef103cbf30ab", + "keyword": "623dc7cf7178bcce57290931b2f99e21ba318bfd", }), ] diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py index 43ef917e0b..ed04bd6c34 100644 --- a/gallery_dl/extractor/exhentai.py +++ b/gallery_dl/extractor/exhentai.py @@ -35,7 +35,7 @@ class ExhentaiGalleryExtractor(Extractor): "exception": exception.AuthorizationError, }), ] - api_url = "https://exhentai.org/api.php" + root = "https://exhentai.org" def __init__(self, match): Extractor.__init__(self) @@ -54,7 +54,7 @@ def items(self): yield Message.Headers, self.setup_headers() yield Message.Cookies, self.session.cookies - url = "https://exhentai.org/g/{}/{}/".format(self.gid, self.token) + url = "{}/g/{}/{}/".format(self.root, self.gid, self.token) response = self.session.get(url) page = response.text if response.status_code == 404 and "Gallery Not Available" in page: @@ -79,7 +79,7 @@ def setup_headers(self): "Accept": "text/html,application/xhtml+xml," "application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", - "Referer": "https://exhentai.org/", + "Referer": self.root + "/", }) headers = self.session.headers.copy() headers["Accept"] = "image/png,image/*;q=0.8,*/*;q=0.5" @@ -108,7 +108,7 @@ def get_job_metadata(self, page): def get_images(self, page): """Collect url and metadata for all images in this gallery""" part = text.extract(page, 'hentai.org/s/', '"')[0] - yield self.image_from_page("https://exhentai.org/s/" + part) + yield self.image_from_page(self.root + "/s/" + part) yield from self.images_from_api() def image_from_page(self, url): @@ -119,7 +119,7 @@ def image_from_page(self, url): (None , '