Fix manhuaren no value for response (#16909) (#16976)

This commit is contained in:
felixfon 2023-07-04 03:13:12 +08:00 committed by GitHub
parent ab13ebc5ea
commit adf419c23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 9 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Manhuaren'
pkgNameSuffix = 'zh.manhuaren'
extClass = '.Manhuaren'
extVersionCode = 8
extVersionCode = 9
}
apply from: "$rootDir/common.gradle"

View File

@ -53,12 +53,39 @@ class Manhuaren : HttpSource() {
val realUrl = url.newBuilder()
.setQueryParameter("gsm", "md5")
.setQueryParameter("gft", "json")
.setQueryParameter("gts", now)
.setQueryParameter("gak", "android_manhuaren2")
.setQueryParameter("gat", "")
.setQueryParameter("gaui", "191909801")
.setQueryParameter("gui", "191909801")
.setQueryParameter("gut", "0")
.setQueryParameter("gak", "android_manhuaren2")
.setQueryParameter("gui", "1")
.setQueryParameter("gts", now)
.setQueryParameter("gut", "")
.setQueryParameter("gem", "1")
.setQueryParameter("gaui", "1")
.setQueryParameter("gln", "")
.setQueryParameter("gcy", "")
.setQueryParameter("gle", "")
.setQueryParameter("gcl", "")
.setQueryParameter("gos", "")
.setQueryParameter("gov", "")
.setQueryParameter("gav", "")
.setQueryParameter("gdi", "")
.setQueryParameter("gfcl", "")
.setQueryParameter("gfut", "")
.setQueryParameter("glut", "")
.setQueryParameter("gpt", "")
.setQueryParameter("gciso", "")
.setQueryParameter("glot", "")
.setQueryParameter("glat", "")
.setQueryParameter("gflot", "")
.setQueryParameter("gflat", "")
.setQueryParameter("glbsaut", "0")
.setQueryParameter("gac", "")
.setQueryParameter("gcut", "")
.setQueryParameter("gfcc", "")
.setQueryParameter("gflg", "")
.setQueryParameter("glcn", "")
.setQueryParameter("glcc", "")
.setQueryParameter("gflcc", "")
return Request.Builder()
.url(realUrl.setQueryParameter("gsn", generateGSNHash(realUrl.build())).build())
.headers(headers)
@ -67,10 +94,8 @@ class Manhuaren : HttpSource() {
}
override fun headersBuilder() = Headers.Builder().apply {
add("X-Yq-Yqci", "{\"le\": \"zh\"}")
add("X-Yq-Yqci", "{\"av\":\"\",\"cl\":\"\",\"cy\":\"\",\"di\":\"0\",\"le\":\"zh\",\"os\":0,\"pt\":\"\"}")
add("User-Agent", "okhttp/3.11.0")
add("Referer", "http://www.dm5.com/dm5api/")
add("clubReferer", "http://mangaapi.manhuaren.com/")
}
private fun hashString(type: String, input: String): String {