MonzeeKomik: Update domain and fix pages (#8899)
Update domain and fix pages
This commit is contained in:
parent
8b7d0ea342
commit
24ba7e3c0c
@ -2,8 +2,8 @@ ext {
|
|||||||
extName = 'Monzee Komik'
|
extName = 'Monzee Komik'
|
||||||
extClass = '.MonzeeKomik'
|
extClass = '.MonzeeKomik'
|
||||||
themePkg = 'mangathemesia'
|
themePkg = 'mangathemesia'
|
||||||
baseUrl = 'https://monzeekomik.my.id'
|
baseUrl = 'https://monzee01.my.id'
|
||||||
overrideVersionCode = 0
|
overrideVersionCode = 1
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,37 @@
|
|||||||
package eu.kanade.tachiyomi.extension.id.monzeekomik
|
package eu.kanade.tachiyomi.extension.id.monzeekomik
|
||||||
|
|
||||||
|
import android.util.Base64
|
||||||
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
|
||||||
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
|
import kotlinx.serialization.json.jsonArray
|
||||||
|
import kotlinx.serialization.json.jsonPrimitive
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
class MonzeeKomik : MangaThemesia(
|
class MonzeeKomik : MangaThemesia(
|
||||||
"Monzee Komik",
|
"Monzee Komik",
|
||||||
"https://monzeekomik.my.id",
|
"https://monzee01.my.id",
|
||||||
"id",
|
"id",
|
||||||
) {
|
) {
|
||||||
override val hasProjectPage = true
|
override val hasProjectPage = true
|
||||||
|
|
||||||
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
val script = document.selectFirst("script[src^='data:text/javascript;base64,dHNfcmVhZGVyLnJ1bih7']")
|
||||||
|
?: return super.pageListParse(document)
|
||||||
|
|
||||||
|
val data = script.attr("src").substringAfter("base64,").let { encoded ->
|
||||||
|
Base64.decode(encoded, Base64.DEFAULT).toString(Charsets.UTF_8)
|
||||||
|
}
|
||||||
|
|
||||||
|
val images = JSON_IMAGE_LIST_REGEX.find(data)?.destructured?.toList()?.get(0).orEmpty().let { jsonString ->
|
||||||
|
try {
|
||||||
|
json.parseToJsonElement(jsonString).jsonArray
|
||||||
|
} catch (_: Exception) {
|
||||||
|
emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return images.mapIndexed { index, element ->
|
||||||
|
Page(index, imageUrl = element.jsonPrimitive.content)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user