From d5a4cf68c6d4ba47d1ad0551cbccb5c57bb25f11 Mon Sep 17 00:00:00 2001 From: Draken <131387159+dragonx943@users.noreply.github.com> Date: Fri, 7 Mar 2025 00:03:43 +0700 Subject: [PATCH] [NewTruyen] Fix dateText + parse function --- .../koitharu/kotatsu/parsers/site/wpcomics/vi/NewTruyen.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/wpcomics/vi/NewTruyen.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/wpcomics/vi/NewTruyen.kt index 18dc4880..2799a2ed 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/wpcomics/vi/NewTruyen.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/wpcomics/vi/NewTruyen.kt @@ -56,11 +56,12 @@ internal class NewTruyen(context: MangaLoaderContext) : val url = "/Story/ListChapterByStoryID?storyID=$storyID" val fullUrl = url.toAbsoluteUrl(domain) val doc = webClient.httpGet(fullUrl).parseHtml() - return doc.select("div.col-xs-5.chapter").mapChapters(reversed = true) { i, li -> - val a = li.selectFirstOrThrow("a") + return doc.select("li.row ").mapChapters(reversed = true) { i, li -> + val chapter = li.select("div.col-xs-5.chapter") + val a = chapter.select("a").firstOrNull() ?: return@mapChapters null val href = a.attrAsRelativeUrl("href") val dateText = li.selectFirst("div.col-xs-4.text-center.small")?.text() - ?.replace("tháng", "tháng")?.replace("ngày", "ngày") // Testing + ?.replace("tháng", "tháng")?.replace("ngày", "ngày") MangaChapter( id = generateUid(href),