diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Kissmanga.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Kissmanga.kt index 77aa99bcc..ae5669f4c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Kissmanga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Kissmanga.kt @@ -154,9 +154,17 @@ class Kissmanga : ParsedHttpSource() { it.evaluate(ca) it.evaluate(lo) - // Find all the urls and decrypt them in JS. - val p = Pattern.compile("""lstImages.push\((.*)\);""") - val m = p.matcher(body) + // There are two functions in an inline script needed to decrypt the urls. We find and + // execute them. + 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 while (m.find()) {