BacaKomik: Fix duplicated pages (#19415)

Signed-off-by: Ahmad Thoriq Najahi <najahi@zephyrus.id>
This commit is contained in:
Ahmad Thoriq Najahi 2023-12-25 06:48:47 +07:00 committed by GitHub
parent 3feb098f69
commit 331e845116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'BacaKomik'
pkgNameSuffix = 'id.bacakomik'
extClass = '.BacaKomik'
extVersionCode = 8
extVersionCode = 9
}
apply from: "$rootDir/common.gradle"

View File

@ -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()) {