Happymh: fix search (#2272)

This commit is contained in:
AwkwardPeak7 2024-04-09 07:29:44 +05:00 committed by Draff
parent 158e5ce4e2
commit a9bfc1d348
2 changed files with 11 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Happymh'
extClass = '.Happymh'
extVersionCode = 9
extVersionCode = 10
}
apply from: "$rootDir/common.gradle"

View File

@ -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 {