mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Nimegami: fix search
This commit is contained in:
parent
7253111d3e
commit
740c47223a
2 changed files with 10 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 8
|
version = 9
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -76,14 +76,18 @@ class Nimegami : MainAPI() {
|
||||||
this.posterUrl = posterUrl
|
this.posterUrl = posterUrl
|
||||||
addSub(episode)
|
addSub(episode)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
return app.get("$mainUrl/?s=$query&post_type=post").document.select("div.archive article")
|
val searchResponse = mutableListOf<SearchResponse>()
|
||||||
|
for (i in 1..2) {
|
||||||
|
val res = app.get("$mainUrl/page/$i/?s=gintama&post_type=post").document.select("div.archive article")
|
||||||
.mapNotNull {
|
.mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
|
searchResponse.addAll(res)
|
||||||
|
}
|
||||||
|
return searchResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
|
Loading…
Reference in a new issue