[Manga18] Fix title not found

This commit is contained in:
Draken
2025-03-17 00:14:18 +07:00
committed by GitHub
parent 6fd18543ef
commit 2a1c5bc6da

View File

@@ -103,7 +103,7 @@ internal abstract class Manga18Parser(
protected open fun parseMangaList(doc: Document): List<Manga> {
return doc.select("div.story_item").map { div ->
val href = div.selectFirstOrThrow("a").attrAsRelativeUrl("href")
val title = div.selectFirst("div.mg_name")?.selectFirst("a")?.text()
val title = div.selectFirst("div.mg_info")?.selectFirst("div.mg_name a")?.text()
?: div.selectFirst("a")?.attr("title")
?: "No name"
Manga(