ReadComicOnline: change user-agent (closes #5612)

This commit is contained in:
scb261 2021-02-07 02:26:02 +02:00
parent 5bdd8924b9
commit e2ef820796
2 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'ReadComicOnline' extName = 'ReadComicOnline'
pkgNameSuffix = 'en.readcomiconline' pkgNameSuffix = 'en.readcomiconline'
extClass = '.Readcomiconline' extClass = '.Readcomiconline'
extVersionCode = 8 extVersionCode = 9
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.FormBody import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request import okhttp3.Request
import okhttp3.Response import okhttp3.Response
@ -36,6 +37,10 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
override val client: OkHttpClient = network.cloudflareClient override val client: OkHttpClient = network.cloudflareClient
override fun headersBuilder() = Headers.Builder().apply {
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
}
private val preferences: SharedPreferences by lazy { private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000) Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
} }