[kissmanga] extend chapter-string regex (closes #58)

This commit is contained in:
Mike Fährmann
2017-12-24 22:53:10 +01:00
parent 0ba618dd1a
commit 28cd78aae0
6 changed files with 12 additions and 7 deletions

View File

@@ -301,7 +301,7 @@ class DeviantartCollectionExtractor(DeviantartExtractor):
test = [(("https://pencilshadings.deviantart.com"
"/favourites/70595441/3D-Favorites"), {
"url": "36ea299132a6b0a0cd319318e9bf18ad32e9b8cc",
"keyword": "e32b1840f1e09d1671bdc0f8a7a72472a0df57a8",
"keyword": "703068ad65c4f2d6e34c5f58483e8a221cb55348",
"options": (("original", False),),
})]

View File

@@ -20,7 +20,7 @@ class JaiminisboxChapterExtractor(foolslide.FoolslideChapterExtractor):
"keyword": "d8919bc8f0351b44e938862214e654401962b5a5",
}),
("https://jaiminisbox.com/reader/read/dr-stone/en/0/16/", {
"keyword": "faa77b1f6ff462cd5e01511ab55b8c2d6ec42c3e",
"keyword": "9b658599651f1ae87cab3e0e29dd21e8337a362c",
}),
]
method = "base64"

View File

@@ -58,9 +58,11 @@ class KissmangaExtractor(Extractor):
), data["chapter_string"])
if not match:
match = re.match(
r"[\w ]+?(?: -)? 0*()(\d+)()(?: *[:-]? *(.+))?",
data["chapter_string"])
match = re.match((
r".+?(?: -)? ()"
r"0*(\d+)(?:[Vv.]0*(\d+))?"
r"(?: *[:-]? *(.+))?"
), data["chapter_string"])
volume, chapter, minor, title = match.groups()
data["volume"] = util.safe_int(volume)

View File

@@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.1.1"
__version__ = "1.1.2-dev"