coymanga: fix site blacklist by request's User-Agent header (#6367)

This commit is contained in:
sunbeams001 2021-03-31 21:51:15 +08:00 committed by GitHub
parent 737030f066
commit e870afd06f
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 = 'CopyManga' extName = 'CopyManga'
pkgNameSuffix = 'zh.copymanga' pkgNameSuffix = 'zh.copymanga'
extClass = '.CopyManga' extClass = '.CopyManga'
extVersionCode = 5 extVersionCode = 6
libVersion = '1.2' libVersion = '1.2'
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -175,7 +175,7 @@ class CopyManga : ConfigurableSource, HttpSource() {
override fun headersBuilder() = super.headersBuilder() override fun headersBuilder() = super.headersBuilder()
.add("Referer", baseUrl) .add("Referer", baseUrl)
.add("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Tachiyomi/1.0") .add("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36")
// Unused, we can get image urls directly from the chapter page // Unused, we can get image urls directly from the chapter page
override fun imageUrlParse(response: Response) = override fun imageUrlParse(response: Response) =