Fix BacaKomik no pages found (#16977)
* Update BacaKomik.kt change target document.select for fix page not found * update extVersionCode to 5 * update bacakomik from document.select to document.getElementsByTag with cdnUrl
This commit is contained in:
parent
13f4e346c3
commit
aaa067a4f9
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'BacaKomik'
|
extName = 'BacaKomik'
|
||||||
pkgNameSuffix = 'id.bacakomik'
|
pkgNameSuffix = 'id.bacakomik'
|
||||||
extClass = '.BacaKomik'
|
extClass = '.BacaKomik'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -185,11 +185,14 @@ 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.imgch-auh img").forEach { element ->
|
val cdnUrl = "https://ttl.bakul.buzz/" // change with correct CDN url
|
||||||
|
document.getElementsByTag("img").forEach { element ->
|
||||||
val url = element.attr("onError").substringAfter("src='").substringBefore("';")
|
val url = element.attr("onError").substringAfter("src='").substringBefore("';")
|
||||||
i++
|
if (url.startsWith(cdnUrl)) {
|
||||||
if (url.isNotEmpty()) {
|
i++
|
||||||
pages.add(Page(i, "", url))
|
if (url.isNotEmpty()) {
|
||||||
|
pages.add(Page(i, "", url))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pages
|
return pages
|
||||||
|
|
Loading…
Reference in New Issue