mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 18:32:39 +01:00
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:
parent
cd0f92796a
commit
1cad3a7867
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Comic Fx'
|
||||
extClass = '.ComicFx'
|
||||
extVersionCode = 5
|
||||
extVersionCode = 6
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user