Komik Cast - Fix match result return null (not found) (#12164)
* Komik Cast - Fix match result return null (not found) * Komik Cast - Updating overrideVersionCode
This commit is contained in:
parent
a561eaa219
commit
3f01076936
|
@ -157,16 +157,23 @@ class KomikCast : WPMangaStream("Komik Cast", "https://komikcast.me", "id") {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
var doc = document
|
||||||
|
var cssQuery = "div#chapter_body .main-reading-area img.size-full"
|
||||||
val imageListRegex = Regex("chapterImages = (.*) \\|\\|")
|
val imageListRegex = Regex("chapterImages = (.*) \\|\\|")
|
||||||
val imageListJson = imageListRegex.find(document.toString())!!.destructured.toList()[0]
|
val imageListMatchResult = imageListRegex.find(document.toString())
|
||||||
|
|
||||||
|
if (imageListMatchResult != null) {
|
||||||
|
val imageListJson = imageListMatchResult.destructured.toList()[0]
|
||||||
val imageList = json.parseToJsonElement(imageListJson).jsonObject
|
val imageList = json.parseToJsonElement(imageListJson).jsonObject
|
||||||
|
|
||||||
var imageServer = "cdn"
|
var imageServer = "cdn"
|
||||||
if (!imageList.containsKey(imageServer)) imageServer = imageList.keys.first()
|
if (!imageList.containsKey(imageServer)) imageServer = imageList.keys.first()
|
||||||
val imageElement = imageList[imageServer]!!.jsonArray.joinToString("")
|
val imageElement = imageList[imageServer]!!.jsonArray.joinToString("")
|
||||||
val doc = Jsoup.parse(json.decodeFromString(imageElement))
|
doc = Jsoup.parse(json.decodeFromString(imageElement))
|
||||||
|
cssQuery = "img.size-full"
|
||||||
|
}
|
||||||
|
|
||||||
return doc.select("img.size-full")
|
return doc.select(cssQuery)
|
||||||
.mapIndexed { i, img -> Page(i, "", img.attr("abs:Src")) }
|
.mapIndexed { i, img -> Page(i, "", img.attr("abs:Src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Kanzenin", "https://kanzenin.xyz", "id", isNsfw = true),
|
SingleLang("Kanzenin", "https://kanzenin.xyz", "id", isNsfw = true),
|
||||||
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik Cast", "https://komikcast.me", "id", overrideVersionCode = 11),
|
SingleLang("Komik Cast", "https://komikcast.me", "id", overrideVersionCode = 12),
|
||||||
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
||||||
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
||||||
SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans", overrideVersionCode = 1),
|
SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans", overrideVersionCode = 1),
|
||||||
|
|
Loading…
Reference in New Issue