BacaKomik: Fix duplicated pages (#19415)
Signed-off-by: Ahmad Thoriq Najahi <najahi@zephyrus.id>
This commit is contained in:
parent
3feb098f69
commit
331e845116
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'BacaKomik'
|
||||
pkgNameSuffix = 'id.bacakomik'
|
||||
extClass = '.BacaKomik'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -189,7 +189,10 @@ class BacaKomik : ParsedHttpSource() {
|
|||
override fun pageListParse(document: Document): List<Page> {
|
||||
val pages = mutableListOf<Page>()
|
||||
var i = 0
|
||||
document.select("div:has(>img[alt*=\"Chapter\"]) img").forEach { element ->
|
||||
document.select("div:has(>img[alt*=\"Chapter\"]) img").filter { element ->
|
||||
val parent = element.parent()
|
||||
parent != null && parent.tagName() != "noscript"
|
||||
}.forEach { element ->
|
||||
val url = element.attr("onError").substringAfter("src='").substringBefore("';")
|
||||
i++
|
||||
if (url.isNotEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue