diff options
| author | 2021-03-13 16:26:30 -0500 | |
|---|---|---|
| committer | 2021-03-13 16:26:30 -0500 | |
| commit | 3201d77a148367d739862b4f07868a76eaeb7cb1 (patch) | |
| tree | 78b8d71633ec000672a84ad0bbbddd0513ae2d30 /gallery_dl/extractor/hentainexus.py | |
| parent | fc83315c164afd74734adf27e0f7fec2011904aa (diff) | |
New upstream version 1.17.0.upstream/1.17.0
Diffstat (limited to 'gallery_dl/extractor/hentainexus.py')
| -rw-r--r-- | gallery_dl/extractor/hentainexus.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gallery_dl/extractor/hentainexus.py b/gallery_dl/extractor/hentainexus.py index 6d3ed74..6c1879c 100644 --- a/gallery_dl/extractor/hentainexus.py +++ b/gallery_dl/extractor/hentainexus.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2019-2020 Mike Fährmann +# Copyright 2019-2021 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -63,14 +63,18 @@ class HentainexusGalleryExtractor(GalleryExtractor): data = json.loads(self._decode(text.extract( page, 'initReader("', '"')[0])) + headers = None + if not self.config("original", True): + headers = {"_http_headers": {"Accept": "image/webp,*/*"}} + pages = data.get("pages") if pages: - return [(page, None) for page in pages] + return [(page, headers) for page in pages] base = data["b"] + data["r"] gid = data["i"] return [ - ("{}{}/{}/{}".format(base, page["h"], gid, page["p"]), None) + ("{}{}/{}/{}".format(base, page["h"], gid, page["p"]), headers) for page in data["f"] ] |
