diff --git a/gallery_dl/extractor/hentaifox.py b/gallery_dl/extractor/hentaifox.py index 093f3fe1..df18a1bd 100644 --- a/gallery_dl/extractor/hentaifox.py +++ b/gallery_dl/extractor/hentaifox.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2019 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 @@ -10,6 +10,7 @@ from .common import GalleryExtractor, Extractor, Message from .. import text +import json class HentaifoxBase(): @@ -23,7 +24,7 @@ class HentaifoxGalleryExtractor(HentaifoxBase, GalleryExtractor): pattern = r"(?:https?://)?(?:www\.)?hentaifox\.com(/gallery/(\d+))" test = ("https://hentaifox.com/gallery/56622/", { "pattern": r"https://i\d*\.hentaifox\.com/\d+/\d+/\d+\.jpg", - "keyword": "b7ff141331d0c7fc711ab28d45dfbb013a83d8e9", + "keyword": "bcd6b67284f378e5cc30b89b761140e3e60fcd92", "count": 24, }) @@ -48,34 +49,28 @@ class HentaifoxGalleryExtractor(HentaifoxBase, GalleryExtractor): } def images(self, page): - pos = page.find('id="load_all"') - if pos >= 0: - extr = text.extract - load_id = extr(page, 'id="load_id" value="', '"', pos)[0] - load_dir = extr(page, 'id="load_dir" value="', '"', pos)[0] - load_pages = extr(page, 'id="load_pages" value="', '"', pos)[0] + cover, pos = text.extract(page, '