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

pull/5029/head
Mike Fährmann 9 months ago
parent 8e1a2b5446
commit c25bdbae91
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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

@ -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",
},
{

Loading…
Cancel
Save