From fe96835d25ecb1f15c702030582a5a4be7e72d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 14 Dec 2018 16:08:36 +0100 Subject: [PATCH] [kissmanga] add fallback for chapter-string parsing (#20) --- gallery_dl/extractor/kissmanga.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/kissmanga.py b/gallery_dl/extractor/kissmanga.py index 534c36bf52..da2c58deeb 100644 --- a/gallery_dl/extractor/kissmanga.py +++ b/gallery_dl/extractor/kissmanga.py @@ -55,7 +55,11 @@ def parse_chapter_string(data): r"(?: *[:-]? *(.+))?" ), data["chapter_string"]) - volume, chapter, minor, title = match.groups() + if match: + volume, chapter, minor, title = match.groups() + else: + volume, chapter, minor, title = 0, 0, "", data["chapter_string"] + data["volume"] = text.parse_int(volume) data["chapter"] = text.parse_int(chapter) data["chapter_minor"] = "." + minor if minor else "" @@ -114,6 +118,10 @@ class KissmangaChapterExtractor(KissmangaBase, ChapterExtractor): "count": 23, "keyword": "d47c94f4c57f4ab690a34b60fefac7b294468856", }), + ("https://kissmanga.com/Manga/Houseki-no-Kuni/Oneshot?id=404189", { + "count": 49, + "keyword": "7835a19c9fc54ec4f2b345e8be3e865cfa57da5c", + }), ("http://kissmanga.com/mAnGa/mOnStEr/Monster-79?id=7608", None), ]