Fix images load DocTruyen3Q (#8119)
This commit is contained in:
parent
9dc2d6f03f
commit
6f47ed8bc1
@ -2,8 +2,8 @@ ext {
|
|||||||
extName = 'DocTruyen3Q'
|
extName = 'DocTruyen3Q'
|
||||||
extClass = '.DocTruyen3Q'
|
extClass = '.DocTruyen3Q'
|
||||||
themePkg = 'wpcomics'
|
themePkg = 'wpcomics'
|
||||||
baseUrl = 'https://doctruyen3qui.pro'
|
baseUrl = 'https://doctruyen3qui3.pro'
|
||||||
overrideVersionCode = 5
|
overrideVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import java.util.TimeZone
|
|||||||
class DocTruyen3Q :
|
class DocTruyen3Q :
|
||||||
WPComics(
|
WPComics(
|
||||||
"DocTruyen3Q",
|
"DocTruyen3Q",
|
||||||
"https://doctruyen3qui.pro",
|
"https://doctruyen3qui3.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")
|
||||||
@ -38,7 +38,11 @@ class DocTruyen3Q :
|
|||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select(".page-chapter[id] a img, .page-chapter[id] img").mapIndexed { index, element ->
|
return document.select(".page-chapter[id] a img, .page-chapter[id] img").mapIndexed { index, element ->
|
||||||
val img = element.attr("abs:src").takeIf { it.isNotBlank() } ?: element.attr("abs:data-original")
|
val img = if (element.hasAttr("data-original")) {
|
||||||
|
element.attr("abs:data-original")
|
||||||
|
} else {
|
||||||
|
element.attr("abs:src")
|
||||||
|
}
|
||||||
Page(index, imageUrl = img)
|
Page(index, imageUrl = img)
|
||||||
}.distinctBy { it.imageUrl }
|
}.distinctBy { it.imageUrl }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user