InfernalVoidScans: Fix cloudflare (#4273)

fix cloudflare
This commit is contained in:
bapeey 2024-07-27 00:31:33 -05:00 committed by Draff
parent 303f6d7737
commit 4d291d571d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.InfernalVoidScans'
themePkg = 'mangathemesia'
baseUrl = 'https://hivetoon.com'
overrideVersionCode = 7
overrideVersionCode = 8
}
apply from: "$rootDir/common.gradle"

View File

@ -10,6 +10,19 @@ class InfernalVoidScans : MangaThemesia(
"https://hivetoon.com",
"en",
) {
override val client = super.client.newBuilder()
.addInterceptor { chain ->
val request = chain.request()
val headers = request.headers.newBuilder()
.set("Cache-Control", "max-age=0")
.build()
chain.proceed(request.newBuilder().headers(headers).build())
}
.build()
override fun headersBuilder() = super.headersBuilder()
.set("Cache-Control", "max-age=0")
override val pageSelector = "div#readerarea > p > img"
override val hasProjectPage = true