Fix kissmanga not loading for some people after the previous update

This commit is contained in:
inorichi 2018-05-24 11:58:42 +02:00
parent e812f6d6e0
commit ff8bb51c4a
2 changed files with 13 additions and 5 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: Kissmanga' appName = 'Tachiyomi: Kissmanga'
pkgNameSuffix = "en.kissmanga" pkgNameSuffix = "en.kissmanga"
extClass = '.Kissmanga' extClass = '.Kissmanga'
extVersionCode = 5 extVersionCode = 6
extVersionSuffix = 2 extVersionSuffix = 3
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -152,9 +152,17 @@ class Kissmanga : ParsedHttpSource() {
it.evaluate(ca) it.evaluate(ca)
it.evaluate(lo) it.evaluate(lo)
// Find all the urls and decrypt them in JS. // There are two functions in an inline script needed to decrypt the urls. We find and
val p = Pattern.compile("""lstImages.push\((.*)\);""") // execute them.
val m = p.matcher(body) var p = Pattern.compile("(var.*CryptoJS.*)")
var m = p.matcher(body)
while (m.find()) {
it.evaluate(m.group(1))
}
// Finally find all the urls and decrypt them in JS.
p = Pattern.compile("""lstImages.push\((.*)\);""")
m = p.matcher(body)
var i = 0 var i = 0
while (m.find()) { while (m.find()) {