[hentainexus] add 'orignal' option (#1322)
This commit is contained in:
@@ -1045,6 +1045,16 @@ Description
|
|||||||
You can use ``"all"`` instead of listing all values separately.
|
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
|
extractor.hitomi.metadata
|
||||||
-------------------------
|
-------------------------
|
||||||
Type
|
Type
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- 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
|
# 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
|
# 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(
|
data = json.loads(self._decode(text.extract(
|
||||||
page, 'initReader("', '"')[0]))
|
page, 'initReader("', '"')[0]))
|
||||||
|
|
||||||
|
if not self.config("original", True):
|
||||||
|
self.session.headers["Accept"] = "image/webp,*/*"
|
||||||
|
|
||||||
pages = data.get("pages")
|
pages = data.get("pages")
|
||||||
if pages:
|
if pages:
|
||||||
return [(page, None) for page in pages]
|
return [(page, None) for page in pages]
|
||||||
|
|||||||
Reference in New Issue
Block a user