summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/hentainexus.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-01-11 03:25:41 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-01-11 03:25:41 -0500
commit6335711bbe769b6b9301a88d88790d7a2f8aa82e (patch)
tree9122f4da2bcce66fbee1a2f21260a2de53dc4cc7 /gallery_dl/extractor/hentainexus.py
parent87a5aa088ce33a1196ff409b76a9ea8233bdc634 (diff)
New upstream version 1.16.3.upstream/1.16.3
Diffstat (limited to 'gallery_dl/extractor/hentainexus.py')
-rw-r--r--gallery_dl/extractor/hentainexus.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gallery_dl/extractor/hentainexus.py b/gallery_dl/extractor/hentainexus.py
index 519453b..6d3ed74 100644
--- a/gallery_dl/extractor/hentainexus.py
+++ b/gallery_dl/extractor/hentainexus.py
@@ -22,7 +22,7 @@ class HentainexusGalleryExtractor(GalleryExtractor):
r"/(?:view|read)/(\d+)")
test = (
("https://hentainexus.com/view/5688", {
- "url": "746d0043e20030f1171aae5ea113176607302517",
+ "url": "f1761895fb7aca2f6ff9e09f839c0ee2fa7a5e54",
"keyword": "5e5bb4b1553b1c6e126b198f9ae017a1a5d0a5ad",
}),
("https://hentainexus.com/read/5688"),
@@ -60,12 +60,15 @@ class HentainexusGalleryExtractor(GalleryExtractor):
def images(self, _):
url = "{}/read/{}".format(self.root, self.gallery_id)
page = self.request(url).text
-
data = json.loads(self._decode(text.extract(
page, 'initReader("', '"')[0]))
+
+ pages = data.get("pages")
+ if pages:
+ return [(page, None) for page in pages]
+
base = data["b"] + data["r"]
gid = data["i"]
-
return [
("{}{}/{}/{}".format(base, page["h"], gid, page["p"]), None)
for page in data["f"]