Change User-Agent Remanga (#5275)

This commit is contained in:
Eugene 2020-12-29 07:42:00 +05:00 committed by GitHub
parent cfaca77d60
commit de178465c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Remanga'
pkgNameSuffix = 'ru.remanga'
extClass = '.Remanga'
extVersionCode = 9
extVersionCode = 10
libVersion = '1.2'
}

View File

@ -70,7 +70,7 @@ class Remanga : ConfigurableSource, HttpSource() {
private var token: String = ""
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", "Tachiyomi")
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
add("Referer", baseUrl)
}
@ -333,7 +333,7 @@ class Remanga : ConfigurableSource, HttpSource() {
private fun combineImage(pages: List<String>): String {
val refererHeaders = Headers.Builder().apply {
add("User-Agent", "Tachiyomi")
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
add("Referer", "https://img.remanga.org")
}.build()
val s = client.newCall(GET(pages[0], refererHeaders)).execute().body()!!.bytes()
@ -358,7 +358,7 @@ class Remanga : ConfigurableSource, HttpSource() {
override fun imageRequest(page: Page): Request {
val refererHeaders = Headers.Builder().apply {
add("User-Agent", "Tachiyomi")
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
add("Referer", "https://img.remanga.org")
}.build()
return GET(page.imageUrl!!, refererHeaders)