Yimmmh: Change User-Agent (#11400)

This commit is contained in:
anenasa 2022-04-09 21:43:29 +08:00 committed by GitHub
parent f146ecdd33
commit 05c00f1760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Yimmh' extName = 'Yimmh'
pkgNameSuffix = 'zh.yimmh' pkgNameSuffix = 'zh.yimmh'
extClass = '.Yimmh' extClass = '.Yimmh'
extVersionCode = 4 extVersionCode = 5
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -29,7 +29,7 @@ class Yimmh : ParsedHttpSource() {
override val supportsLatest: Boolean = true override val supportsLatest: Boolean = true
override val baseUrl: String = "https://m.yimmh.com" override val baseUrl: String = "https://m.yimmh.com"
override fun headersBuilder() = Headers.Builder() override fun headersBuilder() = Headers.Builder()
.add("User-Agent", "Mozilla/5.0 (Android 11; Mobile; rv:83.0) Gecko/83.0 Firefox/83.0") .add("User-Agent", System.getProperty("http.agent")!!)
override val client: OkHttpClient = getUnsafeOkHttpClient() override val client: OkHttpClient = getUnsafeOkHttpClient()
// Trusted all certificates // Trusted all certificates