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'
|
||||
pkgNameSuffix = 'id.bacakomik'
|
||||
extClass = '.BacaKomik'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -185,11 +185,14 @@ class BacaKomik : ParsedHttpSource() {
|
|||
override fun pageListParse(document: Document): List<Page> {
|
||||
val pages = mutableListOf<Page>()
|
||||
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("';")
|
||||
i++
|
||||
if (url.isNotEmpty()) {
|
||||
pages.add(Page(i, "", url))
|
||||
if (url.startsWith(cdnUrl)) {
|
||||
i++
|
||||
if (url.isNotEmpty()) {
|
||||
pages.add(Page(i, "", url))
|
||||
}
|
||||
}
|
||||
}
|
||||
return pages
|
||||
|
|
Loading…
Reference in New Issue