Update vietnamese strings. Document Kissmanga changes

This commit is contained in:
len
2017-03-19 10:51:38 +01:00
parent 68c4116327
commit abe1929b49
2 changed files with 15 additions and 15 deletions

View File

@ -117,25 +117,25 @@ class Kissmanga : ParsedHttpSource() {
override fun pageListParse(response: Response): List<Page> {
val body = response.body().string()
val ca = client.newCall(GET("$baseUrl/Scripts/ca.js", headers)).execute()
val lo = client.newCall(GET("$baseUrl/Scripts/lo.js", headers)).execute()
val caBody = ca.body().string()
val loBody = lo.body().string()
val pages = mutableListOf<Page>()
// Kissmanga now encrypts the urls, so we need to execute these two scripts in JS.
val ca = client.newCall(GET("$baseUrl/Scripts/ca.js", headers)).execute().body().string()
val lo = client.newCall(GET("$baseUrl/Scripts/lo.js", headers)).execute().body().string()
Duktape.create().use {
it.evaluate(ca)
it.evaluate(lo)
it.evaluate(caBody)
it.evaluate(loBody)
// There are two functions in an inline script needed to decrypt the urls. We find and
// execute them.
var p = Pattern.compile("(.*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)