mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Update vietnamese strings. Document Kissmanga changes
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user