mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 12:12:34 +01:00
[kissmanga] fix internal regex
This commit is contained in:
parent
079330785a
commit
5abe32a32c
@ -27,6 +27,7 @@ modules = [
|
|||||||
"imgchili",
|
"imgchili",
|
||||||
"imgth",
|
"imgth",
|
||||||
"imgur",
|
"imgur",
|
||||||
|
"kissmanga",
|
||||||
"konachan",
|
"konachan",
|
||||||
"mangareader",
|
"mangareader",
|
||||||
"nhentai",
|
"nhentai",
|
||||||
|
@ -16,8 +16,8 @@ import re
|
|||||||
info = {
|
info = {
|
||||||
"category": "kissmanga",
|
"category": "kissmanga",
|
||||||
"extractor": "KissmangaExtractor",
|
"extractor": "KissmangaExtractor",
|
||||||
"directory": ["{category}", "{manga}", "c{chapter:>03} - {title}"],
|
"directory": ["{category}", "{manga}", "c{chapter:>03}{chapter-minor} - {title}"],
|
||||||
"filename": "{manga}_c{chapter:>03}_{page:>03}.{extension}",
|
"filename": "{manga}_c{chapter:>03}{chapter-minor}_{page:>03}.{extension}",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/.+/.+\?id=\d+",
|
r"(?:https?://)?(?:www\.)?kissmanga\.com/Manga/.+/.+\?id=\d+",
|
||||||
],
|
],
|
||||||
@ -50,13 +50,16 @@ class KissmangaExtractor(Extractor):
|
|||||||
"""Collect metadata for extractor-job"""
|
"""Collect metadata for extractor-job"""
|
||||||
manga, pos = text.extract(page, "Read manga\n", "\n")
|
manga, pos = text.extract(page, "Read manga\n", "\n")
|
||||||
cinfo, pos = text.extract(page, "", "\n", pos)
|
cinfo, pos = text.extract(page, "", "\n", pos)
|
||||||
match = re.match(r"(?:Vol.0*(\d+) )?Ch.0*(\d+)(?:: (.+))", cinfo)
|
match = re.match(
|
||||||
|
r"(?:Vol.0*(\d+) )?(?:Ch.)?0*(\d+)(?:\.0*(\d+))?(?:: (.+))?", cinfo)
|
||||||
|
chminor = match.group(3)
|
||||||
return {
|
return {
|
||||||
"category": info["category"],
|
"category": info["category"],
|
||||||
"manga": manga,
|
"manga": manga,
|
||||||
"volume": match.group(1) or "",
|
"volume": match.group(1) or "",
|
||||||
"chapter": match.group(2),
|
"chapter": match.group(2),
|
||||||
"title": match.group(3) or "",
|
"chapter-minor": "."+chminor if chminor else "",
|
||||||
|
"title": match.group(4) or "",
|
||||||
"lang": "en",
|
"lang": "en",
|
||||||
"language": "English",
|
"language": "English",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user