CatharsisWorld: Fix page decrypt (#8744)
* fix decrypt * add open vars * bruh
This commit is contained in:
parent
d4e22509bc
commit
7d55595507
@ -979,6 +979,8 @@ abstract class Madara(
|
||||
open val pageListParseSelector = "div.page-break, li.blocks-gallery-item, .reading-content .text-left:not(:has(.blocks-gallery-item)) img"
|
||||
|
||||
open val chapterProtectorSelector = "#chapter-protector-data"
|
||||
open val chapterProtectorPasswordPrefix = "wpmangaprotectornonce='"
|
||||
open val chapterProtectorDataPrefix = "chapter_data='"
|
||||
|
||||
override fun pageListParse(document: Document): List<Page> {
|
||||
launchIO { countViews(document) }
|
||||
@ -994,11 +996,11 @@ abstract class Madara(
|
||||
?.let { Base64.decode(it, Base64.DEFAULT).toString(Charsets.UTF_8) }
|
||||
?: chapterProtector.html()
|
||||
val password = chapterProtectorHtml
|
||||
.substringAfter("wpmangaprotectornonce='")
|
||||
.substringAfter(chapterProtectorPasswordPrefix)
|
||||
.substringBefore("';")
|
||||
val chapterData = json.parseToJsonElement(
|
||||
chapterProtectorHtml
|
||||
.substringAfter("chapter_data='")
|
||||
.substringAfter(chapterProtectorDataPrefix)
|
||||
.substringBefore("';")
|
||||
.replace("\\/", "/"),
|
||||
).jsonObject
|
||||
|
@ -3,7 +3,7 @@ ext {
|
||||
extClass = '.CatharsisWorld'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://catharsisworld.dig-it.info'
|
||||
overrideVersionCode = 2
|
||||
overrideVersionCode = 3
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,9 @@ class CatharsisWorld : Madara(
|
||||
setUrlWithoutDomain(element.selectFirst("a")!!.attr("href"))
|
||||
}
|
||||
|
||||
override val chapterProtectorPasswordPrefix = "protectornonce='"
|
||||
override val chapterProtectorDataPrefix = "_data='"
|
||||
|
||||
private fun Element.imageFromStyle(): String {
|
||||
return this.attr("style").substringAfter("url(").substringBefore(")")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user