1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[komikcast] fix 'manga' extractor (#5027)

This commit is contained in:
Mike Fährmann 2024-01-06 14:19:44 +01:00
parent 8e1a2b5446
commit c25bdbae91
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 20 additions and 4 deletions

View File

@ -76,8 +76,10 @@ class KomikcastMangaExtractor(KomikcastBase, MangaExtractor):
for item in text.extract_iter(
page, '<a class="chapter-link-item" href="', '</a'):
url, _, chapter_string = item.rpartition('">Chapter ')
self.parse_chapter_string(chapter_string, data)
url, _, chapter = item.rpartition('">Chapter')
chapter, sep, minor = chapter.strip().partition(".")
data["chapter"] = text.parse_int(chapter)
data["chapter_minor"] = sep + minor
results.append((url, data.copy()))
return results

View File

@ -57,8 +57,22 @@ __tests__ = (
"#url" : "https://komikcast.site/komik/090-eko-to-issho/",
"#category": ("", "komikcast", "manga"),
"#class" : komikcast.KomikcastMangaExtractor,
"#sha1_url" : "19d3d50d532e84be6280a3d61ff0fd0ca04dd6b4",
"#sha1_metadata": "837a7e96867344ff59d840771c04c20dc46c0ab1",
"#pattern" : komikcast.KomikcastChapterExtractor.pattern,
"#count" : 12,
"author" : "Asakura Maru",
"chapter": range(1, 12),
"chapter_minor": "",
"genres" : [
"Comedy",
"Drama",
"Romance",
"School Life",
"Sci-Fi",
"Shounen"
],
"manga" : "090 Eko to Issho",
"type" : "Manga",
},
{