[NewTruyen] Fix dateText + parse function

master
Draken 1 year ago committed by GitHub
parent 288d6e0b8f
commit d5a4cf68c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save