mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
improved Paradisehill searchResults
This commit is contained in:
parent
d2859e9762
commit
4c91eac6d6
4 changed files with 30 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -10,6 +10,7 @@ class Paradisehill : MainAPI() {
|
|||
override var name = "Paradisehill"
|
||||
override val hasMainPage = true
|
||||
override val hasDownloadSupport = true
|
||||
override var sequentialMainPage = true
|
||||
override val vpnStatus = VPNStatus.MightBeNeeded
|
||||
override val supportedTypes = setOf(TvType.NSFW)
|
||||
|
||||
|
@ -48,11 +49,18 @@ class Paradisehill : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val document = app.get("$mainUrl/search/?pattern=$query&what=1").document
|
||||
return document.select("div.content div.item")
|
||||
.mapNotNull {
|
||||
it.toSearchResult()
|
||||
}
|
||||
val searchResponse = mutableListOf<SearchResponse>()
|
||||
for (i in 1..10) {
|
||||
val document = app.get("$mainUrl/search/?pattern=$query&what=1&page=$i").document
|
||||
val results = document.select("div.content div.item")
|
||||
.mapNotNull {
|
||||
it.toSearchResult()
|
||||
}
|
||||
searchResponse.addAll(results)
|
||||
if(results.isEmpty()) break
|
||||
}
|
||||
|
||||
return searchResponse
|
||||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue