Happymh: Fix search (#16783)

This commit is contained in:
anenasa 2023-06-21 00:12:01 +08:00 committed by GitHub
parent 05702a5dec
commit 4083f04eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Happymh'
pkgNameSuffix = 'zh.happymh'
extClass = '.Happymh'
extVersionCode = 4
extVersionCode = 5
}
apply from: "$rootDir/common.gradle"

View File

@ -83,12 +83,11 @@ class Happymh : HttpSource(), ConfigurableSource {
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val body = FormBody.Builder().addEncoded("searchkey", query).build()
val header = headersBuilder().add("referer", "$baseUrl/ssearch").build()
return POST("$baseUrl/apis/m/ssearch?pn=$page", header, body)
val header = headersBuilder().add("referer", "$baseUrl/sssearch").build()
return POST("$baseUrl/apis/m/ssearch", header, body)
}
override fun searchMangaParse(response: Response): MangasPage {
// I do not find a way to go to next page, so I always set hasNextPage to false
return MangasPage(popularMangaParse(response).mangas, false)
}