From c6cfd24f1938d76700d7719725d0c1af5b029101 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 26 May 2018 15:24:38 +0200 Subject: [PATCH] Fix kissmanga not loading for some people after the previous update --- .../tachiyomi/source/online/english/Kissmanga.kt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 77aa99bcce..ae5669f4c1 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()) {