Skip to content

Commit

Permalink
[kissmanga] add fallback for chapter-string parsing (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Dec 14, 2018
1 parent 4d73cc7 commit fe96835
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gallery_dl/extractor/kissmanga.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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),
]

Expand Down

0 comments on commit fe96835

Please sign in to comment.