MangaOni: Fix bad base64 (#2439)

fix bad base64
This commit is contained in:
bapeey 2024-04-15 05:48:38 -05:00 committed by Draff
parent 9385d11c43
commit 9aecf7e174
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'MangaOni'
extClass = '.MangaOni'
extVersionCode = 15
extVersionCode = 16
isNsfw = true
}

View File

@ -188,7 +188,7 @@ open class MangaOni : ConfigurableSource, ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> {
val encoded = document.select("script:containsData(unicap)").firstOrNull()
?.data()?.substringAfter("'")?.substringBefore("'")?.reversed()
?.data()?.substringAfter("'")?.substringBefore("'")
?: throw Exception("unicap not found")
val drop = encoded.length % 4
val decoded = Base64.decode(encoded.dropLast(drop), Base64.DEFAULT).toString(Charset.defaultCharset())