Comic Fx: fix chapter pages (#877)

* Comic Fx: fix chapter pages

* Update src/id/comicfx/src/eu/kanade/tachiyomi/extension/id/comicfx/ComicFx.kt

Co-authored-by: beerpsi <92439990+beerpiss@users.noreply.github.com>

* Update src/id/comicfx/src/eu/kanade/tachiyomi/extension/id/comicfx/ComicFx.kt

* Update ComicFx.kt

* Update ComicFx.kt

---------

Co-authored-by: beerpsi <92439990+beerpiss@users.noreply.github.com>
This commit is contained in:
Luqman 2024-02-02 16:19:56 +07:00 committed by GitHub
parent cd0f92796a
commit 1cad3a7867
2 changed files with 4 additions and 9 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Comic Fx'
extClass = '.ComicFx'
extVersionCode = 5
extVersionCode = 6
}
apply from: "$rootDir/common.gradle"

View File

@ -205,16 +205,11 @@ class ComicFx : ParsedHttpSource() {
override fun imageUrlParse(document: Document) = ""
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
val pages = document.toString().substringAfter("var pages = ").substringBefore(";")
document.select("#all img").mapIndexed { i, element ->
val image = element.attr("abs:src")
if (image != "") {
pages.add(Page(i, "", image))
}
return json.parseToJsonElement(pages).jsonArray.mapIndexed { i, it ->
Page(i, imageUrl = it.jsonObject["page_image"]!!.jsonPrimitive.content)
}
return pages
}
// filters