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'
|
extName = 'BacaKomik'
|
||||||
pkgNameSuffix = 'id.bacakomik'
|
pkgNameSuffix = 'id.bacakomik'
|
||||||
extClass = '.BacaKomik'
|
extClass = '.BacaKomik'
|
||||||
extVersionCode = 8
|
extVersionCode = 9
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -189,7 +189,10 @@ class BacaKomik : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
var i = 0
|
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("';")
|
val url = element.attr("onError").substringAfter("src='").substringBefore("';")
|
||||||
i++
|
i++
|
||||||
if (url.isNotEmpty()) {
|
if (url.isNotEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue