From 37e0aaeb7543faf868f71414607baa7431c95ee2 Mon Sep 17 00:00:00 2001 From: peakedshout <93729380+peakedshout@users.noreply.github.com> Date: Sun, 20 Apr 2025 09:27:59 +0800 Subject: [PATCH] Jinman Tiantang: add Referer header (#8527) * Adding a Referer value to the request header increases the possibility of circumventing Cloudflare. * Adding a Referer value to the request header increases the possibility of circumventing Cloudflare. * Adding a Referer value to the request header increases the possibility of circumventing Cloudflare. * Update src/zh/jinmantiantang/src/eu/kanade/tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt --------- Co-authored-by: Vetle Ledaal --- src/zh/jinmantiantang/build.gradle | 2 +- .../tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/zh/jinmantiantang/build.gradle b/src/zh/jinmantiantang/build.gradle index 0d3d308bc..40a965eca 100644 --- a/src/zh/jinmantiantang/build.gradle +++ b/src/zh/jinmantiantang/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Jinman Tiantang' extClass = '.Jinmantiantang' - extVersionCode = 47 + extVersionCode = 48 isNsfw = true } diff --git a/src/zh/jinmantiantang/src/eu/kanade/tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt b/src/zh/jinmantiantang/src/eu/kanade/tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt index 7a3e13fc9..e6309c01b 100644 --- a/src/zh/jinmantiantang/src/eu/kanade/tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt +++ b/src/zh/jinmantiantang/src/eu/kanade/tachiyomi/extension/zh/jinmantiantang/Jinmantiantang.kt @@ -55,6 +55,10 @@ class Jinmantiantang : ParsedHttpSource(), ConfigurableSource { .apply { interceptors().add(0, updateUrlInterceptor) } .addInterceptor(ScrambledImageInterceptor).build() + // 添加额外的header增加规避Cloudflare可能性 + override fun headersBuilder() = super.headersBuilder() + .set("Referer", "$baseUrl/") + // 点击量排序(人气) override fun popularMangaRequest(page: Int): Request { return GET("$baseUrl/albums?o=mv&page=$page", headers)