1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 04:32:51 +01:00

[hentainexus] fix extraction

This commit is contained in:
Mike Fährmann 2019-05-25 22:35:04 +02:00
parent 399e8e965a
commit b3e4664715
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -21,8 +21,8 @@ class HentainexusGalleryExtractor(GalleryExtractor):
r"/(?:view|read)/(\d+)") r"/(?:view|read)/(\d+)")
test = ( test = (
("https://hentainexus.com/view/5688", { ("https://hentainexus.com/view/5688", {
"url": "57238d6e76a199298c9866bbcfaa111c0fa164b0", "url": "746d0043e20030f1171aae5ea113176607302517",
"keyword": "5b254937a180b5c2cef303324cd5f7f6fec98d55", "keyword": "b05986369fbaf29cfa08b118960d92c49e59524b",
}), }),
("https://hentainexus.com/read/5688"), ("https://hentainexus.com/read/5688"),
) )
@ -54,10 +54,8 @@ class HentainexusGalleryExtractor(GalleryExtractor):
def images(self, page): def images(self, page):
url = "{}/read/{}".format(self.root, self.gallery_id) url = "{}/read/{}".format(self.root, self.gallery_id)
extr = text.extract_from(self.request(url).text) extr = text.extract_from(self.request(url).text)
imgs = extr("initReader(", "]") + "]" urls = extr("initReader(", "]") + "]"
base = extr('"', '"') return [(url, None) for url in json.loads(urls)]
return [(base + img, None) for img in json.loads(imgs)]
class HentainexusSearchExtractor(Extractor): class HentainexusSearchExtractor(Extractor):