mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
improved Goodporn search result
This commit is contained in:
parent
f64843572d
commit
53f89032f9
2 changed files with 14 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -55,11 +55,19 @@ class GoodPorn : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val document = app.get("$mainUrl/search/$query").document
|
val searchResponse = mutableListOf<SearchResponse>()
|
||||||
return document.select("div#list_videos_videos_list_search_result_items div.item")
|
for (i in 1..10) {
|
||||||
|
val document =
|
||||||
|
app.get(
|
||||||
|
"$mainUrl/search/nikki-benz/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&q=$query&category_ids=&sort_by=&from_videos=$i&from_albums=$i",
|
||||||
|
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||||
|
).document
|
||||||
|
searchResponse.addAll(document.select("div#list_videos_videos_list_search_result_items div.item")
|
||||||
.mapNotNull {
|
.mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
return searchResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
|
Loading…
Reference in a new issue