MangaRaw: add referer to fix images (#6025)

This commit is contained in:
scb261 2021-03-03 15:55:16 +02:00 committed by GitHub
parent b9ed6c6329
commit 03d9353432
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaRaw'
pkgNameSuffix = 'ja.mangaraw'
extClass = '.MangaRawFactory'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -6,6 +6,8 @@ import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Protocol
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
@ -19,10 +21,14 @@ abstract class MangaRaw(
override val supportsLatest = true
override val client = network.cloudflareClient.newBuilder()
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.protocols(listOf(Protocol.HTTP_1_1))
.build()
override fun headersBuilder(): Headers.Builder {
return super.headersBuilder().add("Referer", baseUrl)
}
override fun popularMangaRequest(page: Int) = GET("$baseUrl/seachlist/page/$page/?cat=-1", headers)
override fun popularMangaSelector() = "article"