From 06030aa7c2364d406992f541793824ca359a7696 Mon Sep 17 00:00:00 2001 From: anenasa <84259093+anenasa@users.noreply.github.com> Date: Thu, 27 Jan 2022 21:51:47 +0800 Subject: [PATCH] Gufengmh: Add referer (#10585) --- src/zh/gufengmh/build.gradle | 2 +- .../src/eu/kanade/tachiyomi/extension/zh/gufengmh/Gufengmh.kt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/zh/gufengmh/build.gradle b/src/zh/gufengmh/build.gradle index 2d8db9a1d..a79a38d83 100644 --- a/src/zh/gufengmh/build.gradle +++ b/src/zh/gufengmh/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Gufeng Manhua' pkgNameSuffix = 'zh.gufengmh' extClass = '.Gufengmh' - extVersionCode = 4 + extVersionCode = 5 } diff --git a/src/zh/gufengmh/src/eu/kanade/tachiyomi/extension/zh/gufengmh/Gufengmh.kt b/src/zh/gufengmh/src/eu/kanade/tachiyomi/extension/zh/gufengmh/Gufengmh.kt index e1cf77015..d6db6bd72 100644 --- a/src/zh/gufengmh/src/eu/kanade/tachiyomi/extension/zh/gufengmh/Gufengmh.kt +++ b/src/zh/gufengmh/src/eu/kanade/tachiyomi/extension/zh/gufengmh/Gufengmh.kt @@ -8,6 +8,7 @@ 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.Request import okhttp3.Response import org.jsoup.nodes.Document @@ -19,6 +20,9 @@ class Gufengmh : ParsedHttpSource() { override val supportsLatest: Boolean = true override val baseUrl: String = "https://m.gufengmh9.com" + override fun headersBuilder(): Headers.Builder = Headers.Builder() + .add("Referer", baseUrl) + // Popular override fun popularMangaRequest(page: Int): Request {