Fix images not load DocTruyen3Q (#8272)

* Fix images not load DocTruyen3Q

Fix images not load, update domain DocTruyen3Q

* update
This commit is contained in:
Fioren 2025-03-29 14:14:44 +07:00 committed by Draff
parent e64df9ebc4
commit 26eb2757b4
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 10 additions and 8 deletions

View File

@ -2,8 +2,8 @@ ext {
extName = 'DocTruyen3Q'
extClass = '.DocTruyen3Q'
themePkg = 'wpcomics'
baseUrl = 'https://doctruyen3qui3.pro'
overrideVersionCode = 6
baseUrl = 'https://doctruyen3qui5.pro'
overrideVersionCode = 7
isNsfw = true
}

View File

@ -23,7 +23,7 @@ import java.util.TimeZone
class DocTruyen3Q :
WPComics(
"DocTruyen3Q",
"https://doctruyen3qui3.pro",
"https://doctruyen3qui5.pro",
"vi",
dateFormat = SimpleDateFormat("dd-MM-yyyy", Locale.ROOT).apply {
timeZone = TimeZone.getTimeZone("Asia/Ho_Chi_Minh")
@ -37,11 +37,13 @@ class DocTruyen3Q :
.build()
override fun pageListParse(document: Document): List<Page> {
return document.select(".page-chapter[id] a img, .page-chapter[id] img").mapIndexed { index, element ->
val img = if (element.hasAttr("data-original")) {
element.attr("abs:data-original")
} else {
element.attr("abs:src")
return document.select(".page-chapter[id] img").mapIndexed { index, element ->
val img = element.attr("abs:src").let { url ->
if (url.startsWith("//")) {
"https:$url"
} else {
url
}
}
Page(index, imageUrl = img)
}.distinctBy { it.imageUrl }