[Manga18] Fix title not found
This commit is contained in:
@@ -103,12 +103,15 @@ internal abstract class Manga18Parser(
|
|||||||
protected open fun parseMangaList(doc: Document): List<Manga> {
|
protected open fun parseMangaList(doc: Document): List<Manga> {
|
||||||
return doc.select("div.story_item").map { div ->
|
return doc.select("div.story_item").map { div ->
|
||||||
val href = div.selectFirstOrThrow("a").attrAsRelativeUrl("href")
|
val href = div.selectFirstOrThrow("a").attrAsRelativeUrl("href")
|
||||||
|
val title = div.selectFirst("div.mg_name")?.selectFirst("a")?.text()
|
||||||
|
?: div.selectFirst("a")?.attr("title")
|
||||||
|
?: "No name"
|
||||||
Manga(
|
Manga(
|
||||||
id = generateUid(href),
|
id = generateUid(href),
|
||||||
url = href,
|
url = href,
|
||||||
publicUrl = href.toAbsoluteUrl(div.host ?: domain),
|
publicUrl = href.toAbsoluteUrl(div.host ?: domain),
|
||||||
coverUrl = div.selectFirst("img")?.src(),
|
coverUrl = div.selectFirst("img")?.src(),
|
||||||
title = div.selectFirst("div.mg_info")?.selectFirst("div.mg_name a")?.text().orEmpty(),
|
title = title,
|
||||||
altTitles = emptySet(),
|
altTitles = emptySet(),
|
||||||
rating = RATING_UNKNOWN,
|
rating = RATING_UNKNOWN,
|
||||||
tags = emptySet(),
|
tags = emptySet(),
|
||||||
|
|||||||
Reference in New Issue
Block a user