Happymh: Fix search (#16783)
This commit is contained in:
parent
05702a5dec
commit
4083f04eb1
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Happymh'
|
extName = 'Happymh'
|
||||||
pkgNameSuffix = 'zh.happymh'
|
pkgNameSuffix = 'zh.happymh'
|
||||||
extClass = '.Happymh'
|
extClass = '.Happymh'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -83,12 +83,11 @@ class Happymh : HttpSource(), ConfigurableSource {
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val body = FormBody.Builder().addEncoded("searchkey", query).build()
|
val body = FormBody.Builder().addEncoded("searchkey", query).build()
|
||||||
val header = headersBuilder().add("referer", "$baseUrl/ssearch").build()
|
val header = headersBuilder().add("referer", "$baseUrl/sssearch").build()
|
||||||
return POST("$baseUrl/apis/m/ssearch?pn=$page", header, body)
|
return POST("$baseUrl/apis/m/ssearch", header, body)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaParse(response: Response): MangasPage {
|
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)
|
return MangasPage(popularMangaParse(response).mangas, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue