Fix images not load TopTruyen (#8130)

Fix images not load and update domain TopTruyen
This commit is contained in:
Fioren 2025-03-20 18:17:23 +07:00 committed by Draff
parent 3fe012a4c7
commit 3bc05706e5
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 7 additions and 7 deletions

View File

@ -2,8 +2,8 @@ ext {
extName = 'Top Truyen'
extClass = '.TopTruyen'
themePkg = 'wpcomics'
baseUrl = 'https://www.toptruyentv.pro'
overrideVersionCode = 9
baseUrl = 'https://www.toptruyentv2.pro'
overrideVersionCode = 10
isNsfw = true
}

View File

@ -23,7 +23,7 @@ import java.util.TimeZone
class TopTruyen :
WPComics(
"Top Truyen",
"https://www.toptruyentv.pro",
"https://www.toptruyentv2.pro",
"vi",
dateFormat = SimpleDateFormat("dd-MM-yyyy", Locale.ROOT).apply {
timeZone = TimeZone.getTimeZone("Asia/Ho_Chi_Minh")
@ -37,10 +37,10 @@ class TopTruyen :
.build()
override fun pageListParse(document: Document): List<Page> {
return document.select(".page-chapter[id] img")
.mapNotNull(::imageOrNull)
.distinct()
.mapIndexed { i, image -> Page(i, imageUrl = image) }
return document.select("div[id^=page_].page-chapter img").mapIndexed { index, element ->
val img = element.attr("abs:src")
Page(index, imageUrl = img)
}.distinctBy { it.imageUrl }
}
override fun popularMangaSelector() = "div.item-manga div.item"