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' extName = 'Top Truyen'
extClass = '.TopTruyen' extClass = '.TopTruyen'
themePkg = 'wpcomics' themePkg = 'wpcomics'
baseUrl = 'https://www.toptruyentv.pro' baseUrl = 'https://www.toptruyentv2.pro'
overrideVersionCode = 9 overrideVersionCode = 10
isNsfw = true isNsfw = true
} }

View File

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