mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 03:33:24 +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 {
|
ext {
|
||||||
extName = 'Bakai'
|
extName = 'Bakai'
|
||||||
extClass = '.Bakai'
|
extClass = '.Bakai'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class Bakai : ParsedHttpSource() {
|
|||||||
override val supportsLatest = false
|
override val supportsLatest = false
|
||||||
|
|
||||||
override val client by lazy {
|
override val client by lazy {
|
||||||
network.client.newBuilder()
|
network.cloudflareClient.newBuilder()
|
||||||
.rateLimitHost(baseUrl.toHttpUrl(), 1, 2, TimeUnit.SECONDS)
|
.rateLimitHost(baseUrl.toHttpUrl(), 1, 2, TimeUnit.SECONDS)
|
||||||
.cookieJar(
|
.cookieJar(
|
||||||
object : CookieJar {
|
object : CookieJar {
|
||||||
@ -53,6 +53,14 @@ class Bakai : ParsedHttpSource() {
|
|||||||
.build()
|
.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 ===============================
|
// ============================== Popular ===============================
|
||||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/home3/page/$page/")
|
override fun popularMangaRequest(page: Int) = GET("$baseUrl/home3/page/$page/")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user