From a9bfc1d348d0f0192c474dae91812a8f3626106e Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Tue, 9 Apr 2024 07:29:44 +0500 Subject: [PATCH] Happymh: fix search (#2272) --- src/zh/happymh/build.gradle | 2 +- .../tachiyomi/extension/zh/happymh/Happymh.kt | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/zh/happymh/build.gradle b/src/zh/happymh/build.gradle index 6344dfa31..54a432218 100644 --- a/src/zh/happymh/build.gradle +++ b/src/zh/happymh/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Happymh' extClass = '.Happymh' - extVersionCode = 9 + extVersionCode = 10 } apply from: "$rootDir/common.gradle" diff --git a/src/zh/happymh/src/eu/kanade/tachiyomi/extension/zh/happymh/Happymh.kt b/src/zh/happymh/src/eu/kanade/tachiyomi/extension/zh/happymh/Happymh.kt index 9ce006d04..bd61f6914 100644 --- a/src/zh/happymh/src/eu/kanade/tachiyomi/extension/zh/happymh/Happymh.kt +++ b/src/zh/happymh/src/eu/kanade/tachiyomi/extension/zh/happymh/Happymh.kt @@ -95,9 +95,16 @@ class Happymh : HttpSource(), ConfigurableSource { // Search override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val body = FormBody.Builder().addEncoded("searchkey", query).build() - val header = headersBuilder().add("referer", "$baseUrl/sssearch").build() - return POST("$baseUrl/apis/m/ssearch", header, body) + val body = FormBody.Builder() + .addEncoded("searchkey", query) + .add("v", "v2.13") + .build() + + val header = headersBuilder() + .add("referer", "$baseUrl/sssearch") + .build() + + return POST("$baseUrl/v2.0/apis/manga/ssearch", header, body) } override fun searchMangaParse(response: Response): MangasPage {