Fix manhuaren no value for response (#17008) (#17013)

This commit is contained in:
felixfon 2023-07-06 06:28:59 +08:00 committed by GitHub
parent 99b3cb4ce3
commit deb7903b1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 31 deletions

View File

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

View File

@ -53,38 +53,38 @@ class Manhuaren : HttpSource() {
val realUrl = url.newBuilder()
.setQueryParameter("gsm", "md5")
.setQueryParameter("gft", "json")
.setQueryParameter("gat", "")
.setQueryParameter("gak", "android_manhuaren2")
.setQueryParameter("gui", "1")
.setQueryParameter("gts", now)
.setQueryParameter("gut", "")
.setQueryParameter("gat", "")
.setQueryParameter("gui", "1") // user ID (> 0)
.setQueryParameter("gts", now) // timestamp yyyy-MM-dd+HH:mm:ss
.setQueryParameter("gut", "0") // user type
.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", "")
.setQueryParameter("gln", "") // location
.setQueryParameter("gcy", "TW") // country
.setQueryParameter("gle", "zh") // language
.setQueryParameter("gcl", "dm5") // umeng channel
.setQueryParameter("gos", "1") // OS (int)
.setQueryParameter("gov", "22_5.1.1") // "{Build.VERSION.SDK_INT}_{Build.VERSION.RELEASE}"
.setQueryParameter("gav", "7.0.1") // app version
.setQueryParameter("gdi", "358240051111110") // device info
.setQueryParameter("gfcl", "dm5") // umeng channel config
.setQueryParameter("gfut", "1688319526000") // assign user ID config
.setQueryParameter("glut", "1688319526000") // update time config
.setQueryParameter("gpt", "com.mhr.mangamini") // package name
.setQueryParameter("gciso", "tw") // https://developer.android.com/reference/android/telephony/TelephonyManager#getSimCountryIso()
.setQueryParameter("glot", "") // longitude
.setQueryParameter("glat", "") // latitude
.setQueryParameter("gflot", "") // first location longitude
.setQueryParameter("gflat", "") // first location latitude
.setQueryParameter("glbsaut", "0") // is allow location (0 or 1)
.setQueryParameter("gac", "") // area code
.setQueryParameter("gcut", "GMT+8") // time zone
.setQueryParameter("gfcc", "") // first country code
.setQueryParameter("gflg", "") // first language
.setQueryParameter("glcn", "") // country name
.setQueryParameter("glcc", "") // country code
.setQueryParameter("gflcc", "") // first location country code
return Request.Builder()
.url(realUrl.setQueryParameter("gsn", generateGSNHash(realUrl.build())).build())
@ -94,7 +94,6 @@ class Manhuaren : HttpSource() {
}
override fun headersBuilder() = Headers.Builder().apply {
add("X-Yq-Yqci", "{\"av\":\"\",\"cl\":\"\",\"cy\":\"\",\"di\":\"0\",\"le\":\"zh\",\"os\":0,\"pt\":\"\"}")
add("User-Agent", "okhttp/3.11.0")
}