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' extName = 'Manhuaren'
pkgNameSuffix = 'zh.manhuaren' pkgNameSuffix = 'zh.manhuaren'
extClass = '.Manhuaren' extClass = '.Manhuaren'
extVersionCode = 9 extVersionCode = 10
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

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