[hentainexus] add 'orignal' option (#1322)

pull/1352/head
Mike Fährmann 4 years ago
parent 03b219db9d
commit 6b0ecbf6bc
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1045,6 +1045,16 @@ Description
You can use ``"all"`` instead of listing all values separately.
extractor.hentainexus.original
------------------------------
Type
``bool``
Default
``true``
Description
Download original files instead of WebP versions.
extractor.hitomi.metadata
-------------------------
Type

@ -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,6 +63,9 @@ class HentainexusGalleryExtractor(GalleryExtractor):
data = json.loads(self._decode(text.extract(
page, 'initReader("', '"')[0]))
if not self.config("original", True):
self.session.headers["Accept"] = "image/webp,*/*"
pages = data.get("pages")
if pages:
return [(page, None) for page in pages]

Loading…
Cancel
Save