[Grouple] Fix alt titles parsing

master
Koitharu 2 years ago
parent 68cc1d4c4f
commit f22362dc53
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -130,6 +130,8 @@ internal abstract class GroupleParser(
val newSource = getSource(response.request.url) val newSource = getSource(response.request.url)
return manga.copy( return manga.copy(
source = newSource, source = newSource,
altTitle = root.selectFirst(".all-names-popover")?.select(".name")?.joinToString { it.text() }
?: manga.altTitle,
description = root.selectFirst("div.manga-description")?.html(), description = root.selectFirst("div.manga-description")?.html(),
largeCoverUrl = coverImg?.attr("data-full"), largeCoverUrl = coverImg?.attr("data-full"),
coverUrl = coverImg?.attr("data-thumb") ?: manga.coverUrl, coverUrl = coverImg?.attr("data-thumb") ?: manga.coverUrl,
@ -387,7 +389,7 @@ internal abstract class GroupleParser(
url = relUrl, url = relUrl,
publicUrl = href, publicUrl = href,
title = title, title = title,
altTitle = descDiv.selectFirst("h4")?.text(), altTitle = descDiv.selectFirst("h5")?.textOrNull(),
coverUrl = imgDiv.selectFirst("img.lazy")?.attr("data-original")?.replace("_p.", ".").orEmpty(), coverUrl = imgDiv.selectFirst("img.lazy")?.attr("data-original")?.replace("_p.", ".").orEmpty(),
rating = runCatching { rating = runCatching {
node.selectFirst(".compact-rate")?.attr("title")?.toFloatOrNull()?.div(5f) node.selectFirst(".compact-rate")?.attr("title")?.toFloatOrNull()?.div(5f)

Loading…
Cancel
Save