Change User-Agent Remanga (#5275)
This commit is contained in:
parent
cfaca77d60
commit
de178465c7
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Remanga'
|
extName = 'Remanga'
|
||||||
pkgNameSuffix = 'ru.remanga'
|
pkgNameSuffix = 'ru.remanga'
|
||||||
extClass = '.Remanga'
|
extClass = '.Remanga'
|
||||||
extVersionCode = 9
|
extVersionCode = 10
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
private var token: String = ""
|
private var token: String = ""
|
||||||
|
|
||||||
override fun headersBuilder() = Headers.Builder().apply {
|
override fun headersBuilder() = Headers.Builder().apply {
|
||||||
add("User-Agent", "Tachiyomi")
|
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
|
||||||
add("Referer", baseUrl)
|
add("Referer", baseUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ class Remanga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
private fun combineImage(pages: List<String>): String {
|
private fun combineImage(pages: List<String>): String {
|
||||||
val refererHeaders = Headers.Builder().apply {
|
val refererHeaders = Headers.Builder().apply {
|
||||||
add("User-Agent", "Tachiyomi")
|
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
|
||||||
add("Referer", "https://img.remanga.org")
|
add("Referer", "https://img.remanga.org")
|
||||||
}.build()
|
}.build()
|
||||||
val s = client.newCall(GET(pages[0], refererHeaders)).execute().body()!!.bytes()
|
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 {
|
override fun imageRequest(page: Page): Request {
|
||||||
val refererHeaders = Headers.Builder().apply {
|
val refererHeaders = Headers.Builder().apply {
|
||||||
add("User-Agent", "Tachiyomi")
|
add("User-Agent", "Tachiyomi" + System.getProperty("http.agent"))
|
||||||
add("Referer", "https://img.remanga.org")
|
add("Referer", "https://img.remanga.org")
|
||||||
}.build()
|
}.build()
|
||||||
return GET(page.imageUrl!!, refererHeaders)
|
return GET(page.imageUrl!!, refererHeaders)
|
||||||
|
|
Loading…
Reference in New Issue