mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 02:12:42 +01:00
Bakai: Fix headers and change network client (#5272)
Fix headers and cloudflare
This commit is contained in:
parent
3abdb00df6
commit
f05b4f13e9
@ -1,7 +1,7 @@
|
||||
ext {
|
||||
extName = 'Bakai'
|
||||
extClass = '.Bakai'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class Bakai : ParsedHttpSource() {
|
||||
override val supportsLatest = false
|
||||
|
||||
override val client by lazy {
|
||||
network.client.newBuilder()
|
||||
network.cloudflareClient.newBuilder()
|
||||
.rateLimitHost(baseUrl.toHttpUrl(), 1, 2, TimeUnit.SECONDS)
|
||||
.cookieJar(
|
||||
object : CookieJar {
|
||||
@ -53,6 +53,14 @@ class Bakai : ParsedHttpSource() {
|
||||
.build()
|
||||
}
|
||||
|
||||
override fun headersBuilder() = super.headersBuilder()
|
||||
.set("Referer", baseUrl)
|
||||
.set("Cache-Control", "no-cache")
|
||||
.set("Sec-Fetch-Dest", "image")
|
||||
.set("Sec-Fetch-Mode", "no-cors")
|
||||
.set("Sec-Fetch-Site", "same-site")
|
||||
.set("Sec-GPC", "1")
|
||||
|
||||
// ============================== Popular ===============================
|
||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/home3/page/$page/")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user