From deaacc70bb8b62bdf4cbabca7f0b4fb605f88b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 25 Aug 2020 21:56:24 +0200 Subject: [PATCH] [hitomi] update URL pattern for tag searches --- gallery_dl/extractor/hitomi.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/hitomi.py b/gallery_dl/extractor/hitomi.py index 4061a217..209a4f2b 100644 --- a/gallery_dl/extractor/hitomi.py +++ b/gallery_dl/extractor/hitomi.py @@ -158,9 +158,9 @@ class HitomiTagExtractor(Extractor): subcategory = "tag" pattern = (r"(?:https?://)?hitomi\.la/" r"(tag|artist|group|series|type|character)/" - r"([^/?&#]+)-\d+\.html") + r"([^/?&#]+)\.html") test = ( - ("https://hitomi.la/tag/screenshots-japanese-1.html", { + ("https://hitomi.la/tag/screenshots-japanese.html", { "pattern": HitomiGalleryExtractor.pattern, "count": ">= 35", }), @@ -175,6 +175,10 @@ class HitomiTagExtractor(Extractor): Extractor.__init__(self, match) self.type, self.tag = match.groups() + tag, _, num = self.tag.rpartition("-") + if num.isdecimal(): + self.tag = tag + def items(self): url = "https://ltn.hitomi.la/{}/{}.nozomi".format(self.type, self.tag) data = {"_extractor": HitomiGalleryExtractor}