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 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 chapterProtectorSelector = "#chapter-protector-data"
|
||||||
|
open val chapterProtectorPasswordPrefix = "wpmangaprotectornonce='"
|
||||||
|
open val chapterProtectorDataPrefix = "chapter_data='"
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
launchIO { countViews(document) }
|
launchIO { countViews(document) }
|
||||||
@ -994,11 +996,11 @@ abstract class Madara(
|
|||||||
?.let { Base64.decode(it, Base64.DEFAULT).toString(Charsets.UTF_8) }
|
?.let { Base64.decode(it, Base64.DEFAULT).toString(Charsets.UTF_8) }
|
||||||
?: chapterProtector.html()
|
?: chapterProtector.html()
|
||||||
val password = chapterProtectorHtml
|
val password = chapterProtectorHtml
|
||||||
.substringAfter("wpmangaprotectornonce='")
|
.substringAfter(chapterProtectorPasswordPrefix)
|
||||||
.substringBefore("';")
|
.substringBefore("';")
|
||||||
val chapterData = json.parseToJsonElement(
|
val chapterData = json.parseToJsonElement(
|
||||||
chapterProtectorHtml
|
chapterProtectorHtml
|
||||||
.substringAfter("chapter_data='")
|
.substringAfter(chapterProtectorDataPrefix)
|
||||||
.substringBefore("';")
|
.substringBefore("';")
|
||||||
.replace("\\/", "/"),
|
.replace("\\/", "/"),
|
||||||
).jsonObject
|
).jsonObject
|
||||||
|
@ -3,7 +3,7 @@ ext {
|
|||||||
extClass = '.CatharsisWorld'
|
extClass = '.CatharsisWorld'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://catharsisworld.dig-it.info'
|
baseUrl = 'https://catharsisworld.dig-it.info'
|
||||||
overrideVersionCode = 2
|
overrideVersionCode = 3
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,9 @@ class CatharsisWorld : Madara(
|
|||||||
setUrlWithoutDomain(element.selectFirst("a")!!.attr("href"))
|
setUrlWithoutDomain(element.selectFirst("a")!!.attr("href"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override val chapterProtectorPasswordPrefix = "protectornonce='"
|
||||||
|
override val chapterProtectorDataPrefix = "_data='"
|
||||||
|
|
||||||
private fun Element.imageFromStyle(): String {
|
private fun Element.imageFromStyle(): String {
|
||||||
return this.attr("style").substringAfter("url(").substringBefore(")")
|
return this.attr("style").substringAfter("url(").substringBefore(")")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user