From b952e6e1b4bdf3d4c89c7e89cf335d37202a00af Mon Sep 17 00:00:00 2001 From: enduser420 <91022934+enduser420@users.noreply.github.com> Date: Mon, 24 Oct 2022 19:23:51 +0530 Subject: [PATCH] [hentai2read] recognize '.' in chapter (#3089) --- gallery_dl/extractor/hentai2read.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/gallery_dl/extractor/hentai2read.py b/gallery_dl/extractor/hentai2read.py index 53be67b151e..75081f74bf2 100644 --- a/gallery_dl/extractor/hentai2read.py +++ b/gallery_dl/extractor/hentai2read.py @@ -23,26 +23,34 @@ class Hentai2readBase(): class Hentai2readChapterExtractor(Hentai2readBase, ChapterExtractor): """Extractor for a single manga chapter from hentai2read.com""" archive_fmt = "{chapter_id}_{page}" - pattern = r"(?:https?://)?(?:www\.)?hentai2read\.com(/[^/?#]+/(\d+))" - test = ("https://hentai2read.com/amazon_elixir/1/", { - "url": "964b942cf492b3a129d2fe2608abfc475bc99e71", - "keyword": "ff84b8f751f0e4ee37717efc4332ff1db71951d9", - }) + pattern = r"(?:https?://)?(?:www\.)?hentai2read\.com(/[^/?#]+/([^/?#]+))" + test = ( + ("https://hentai2read.com/amazon_elixir/1/", { + "url": "964b942cf492b3a129d2fe2608abfc475bc99e71", + "keyword": "85645b02d34aa11b3deb6dadd7536863476e1bad", + }), + ("https://hentai2read.com/popuni_kei_joshi_panic/2.5/", { + "url": "454a2312238e3aa7d89dd118252f57c084e21d29", + "keyword": "1f244247ad9a801fce3671a4d88c21d4e5b3c7a3", + }), + ) def __init__(self, match): self.chapter = match.group(2) ChapterExtractor.__init__(self, match) def metadata(self, page): + chapter, sep, minor = self.chapter.partition(".") title, pos = text.extract(page, "