From ffd38215a4d42ad7d7828b219c5b75310080deaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 22 Oct 2020 15:15:34 +0200 Subject: [PATCH] [hitomi] fix image URLs and URL pattern - non-webp files are now hosted on [a-c]b.hitomi.la - removed ampersand from invalid slug characters --- gallery_dl/extractor/hitomi.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py index f341c476..d80ce69f 100644 --- a/gallery_dl/extractor/hitomi.py +++ b/gallery_dl/extractor/hitomi.py @@ -21,10 +21,10 @@ class HitomiGalleryExtractor(GalleryExtractor): root = "https://hitomi.la" pattern = (r"(?:https?://)?hitomi\.la" r"/(?:manga|doujinshi|cg|gamecg|galleries|reader)" - r"/(?:[^/?&#]+-)?(\d+)") + r"/(?:[^/?#]+-)?(\d+)") test = ( ("https://hitomi.la/galleries/867789.html", { - "pattern": r"https://[a-c]a.hitomi.la/images/./../[0-9a-f]+.jpg", + "pattern": r"https://[a-c]b.hitomi.la/images/./../[0-9a-f]+.jpg", "keyword": "4873ef9a523621fc857b114e0b2820ba4066e9ae", "count": 16, }), @@ -35,12 +35,12 @@ class HitomiGalleryExtractor(GalleryExtractor): }), # Game CG with scenes (#321) ("https://hitomi.la/galleries/733697.html", { - "url": "b4cbc76032852db4a655bf6a2c4d58eae8153c8e", + "url": "ec3fe9b708ee376ec579b90d053ad485c0777552", "count": 210, }), # fallback for galleries only available through /reader/ URLs ("https://hitomi.la/galleries/1045954.html", { - "url": "f3aa914ad148437f72d307268fa0d250eabe8dab", + "url": "bf4ed4e726204da5bc37a236ca476a2a96081388", "count": 1413, }), # gallery with "broken" redirect @@ -143,7 +143,7 @@ class HitomiGalleryExtractor(GalleryExtractor): frontends = 2 if inum < 0x30 else 3 inum = 1 if inum < 0x09 else inum - url = "https://{}a.hitomi.la/images/{}/{}/{}.{}".format( + url = "https://{}b.hitomi.la/images/{}/{}/{}.{}".format( chr(97 + (inum % frontends)), ihash[-1], ihash[-3:-1], ihash, idata["extension"],