summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/hentainexus.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/hentainexus.py')
-rw-r--r--gallery_dl/extractor/hentainexus.py10
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"]
]