From 87a87bff7e293323084ae4f5ddfdfee40c9191a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 28 Oct 2019 21:11:06 +0100 Subject: [PATCH] [simplyhentai] fix image URLs --- gallery_dl/extractor/bobx.py | 8 ++++---- gallery_dl/extractor/simplyhentai.py | 5 ++++- test/test_results.py | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/bobx.py b/gallery_dl/extractor/bobx.py index 67427a75..dba5fe73 100644 --- a/gallery_dl/extractor/bobx.py +++ b/gallery_dl/extractor/bobx.py @@ -94,7 +94,8 @@ class BobxIdolExtractor(BobxExtractor): subcategory = "idol" pattern = r"(?:https?://)?(?:www\.)?bobx\.com/([^/]+/[^/?&#]+)/?$" test = ("http://www.bobx.com/idol/rin-okabe/", { - "url": "74d80bfcd53b738b31909bb42e5cc97c41b475b8", + "pattern": BobxGalleryExtractor.pattern, + "count": ">= 6", }) def items(self): @@ -107,6 +108,5 @@ class BobxIdolExtractor(BobxExtractor): for part in text.extract_iter(page, '="photoset/', '"'): # skip every other entry skip = not skip - if skip: - continue - yield Message.Queue, "{}photoset/{}".format(url, part), data + if not skip: + yield Message.Queue, "{}photoset/{}".format(url, part), data diff --git a/gallery_dl/extractor/simplyhentai.py b/gallery_dl/extractor/simplyhentai.py index fae1c1a0..82a61da5 100644 --- a/gallery_dl/extractor/simplyhentai.py +++ b/gallery_dl/extractor/simplyhentai.py @@ -67,7 +67,10 @@ class SimplyhentaiGalleryExtractor(GalleryExtractor): headers = {"Accept": "application/json"} images = self.request(url, headers=headers).json() return [ - (urls["full"], {"image_id": text.parse_int(image_id)}) + ( + urls["full"].replace("/giant_thumb_", "/"), + {"image_id": text.parse_int(image_id)}, + ) for image_id, urls in sorted(images.items()) ] diff --git a/test/test_results.py b/test/test_results.py index 81a8b4ff..4ade7646 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -27,7 +27,6 @@ TRAVIS_SKIP = { # temporary issues, etc. BROKEN = { "8chan", - "hentaifoundry", "mangapark", }