[Fix] Mangahere - Parser for webtoon type (#1810)
* Update build.gradle * Added Webtoon Parser * Update Mangahere.kt Missed a '
This commit is contained in:
parent
29fe7cd15a
commit
05d7a6951f
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Mangahere'
|
appName = 'Tachiyomi: Mangahere'
|
||||||
pkgNameSuffix = 'en.mangahere'
|
pkgNameSuffix = 'en.mangahere'
|
||||||
extClass = '.Mangahere'
|
extClass = '.Mangahere'
|
||||||
extVersionCode = 10
|
extVersionCode = 11
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,19 @@ class Mangahere : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
|
val bar = document.select("script[src*=chapter_bar]")
|
||||||
|
if (!bar.isNullOrEmpty()){
|
||||||
|
val script = document.select("script:containsData(function(p,a,c,k,e,d))").html().removePrefix("eval")
|
||||||
|
val duktape = Duktape.create()
|
||||||
|
val DeobfuscatedScript = duktape.evaluate(script).toString()
|
||||||
|
val urls = DeobfuscatedScript.substringAfter("newImgs=['").substringBefore("'];").split("','")
|
||||||
|
duktape.close()
|
||||||
|
val pages = mutableListOf<Page>()
|
||||||
|
urls.forEachIndexed { index, s ->
|
||||||
|
pages.add(Page(index, "", "http:$s"))
|
||||||
|
}
|
||||||
|
return pages
|
||||||
|
} else {
|
||||||
|
|
||||||
val html = document.html()
|
val html = document.html()
|
||||||
val link = document.location()
|
val link = document.location()
|
||||||
|
@ -259,6 +272,7 @@ class Mangahere : ParsedHttpSource() {
|
||||||
duktape.close()
|
duktape.close()
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun extractSecretKey(html: String, duktape: Duktape): String {
|
private fun extractSecretKey(html: String, duktape: Duktape): String {
|
||||||
|
|
Loading…
Reference in New Issue