mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Updated Animixplay search
This commit is contained in:
parent
421924efd1
commit
ef6da9600b
1 changed files with 181 additions and 178 deletions
|
@ -51,7 +51,7 @@ class Animixplay : MainAPI() {
|
||||||
"$mainUrl/api/search" to "Movie",
|
"$mainUrl/api/search" to "Movie",
|
||||||
)
|
)
|
||||||
|
|
||||||
private var newPagination : String? = null
|
private var newPagination: String? = null
|
||||||
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
||||||
val items = mutableListOf<HomePageList>()
|
val items = mutableListOf<HomePageList>()
|
||||||
val paged = page.toString()
|
val paged = page.toString()
|
||||||
|
@ -132,17 +132,18 @@ class Animixplay : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override suspend fun search(query: String):List<SearchResponse>?{
|
override suspend fun search(query: String): List<SearchResponse>? {
|
||||||
val searchData = app.post(
|
return app.post(
|
||||||
url = "https://v1.ij7p9towl8uj4qafsopjtrjk.workers.dev",
|
url = "https://v1.ij7p9towl8uj4qafsopjtrjk.workers.dev",
|
||||||
referer = mainUrl,
|
referer = mainUrl,
|
||||||
data = mapOf(
|
data = mapOf(
|
||||||
"q2" to query,
|
"q2" to query,
|
||||||
"origin" to "1",
|
"origin" to "1",
|
||||||
"root" to "animixplay.to",
|
"root" to "animixplay.to",
|
||||||
"d" to "gogoanime.tel")
|
"d" to "gogoanime.tel"
|
||||||
)
|
)
|
||||||
return Jsoup.parse(JSONObject(searchData.text).get("result").toString()).select("div").map{elem->
|
).parsedSafe<FullSearch>()?.result?.let {
|
||||||
|
Jsoup.parse(it).select("div").map { elem ->
|
||||||
|
|
||||||
val href = fixUrl(elem.select("a").attr("href"))
|
val href = fixUrl(elem.select("a").attr("href"))
|
||||||
val title = elem.select("a").attr("title")
|
val title = elem.select("a").attr("title")
|
||||||
|
@ -152,6 +153,7 @@ class Animixplay : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
||||||
return app.post(
|
return app.post(
|
||||||
|
@ -279,9 +281,6 @@ class Animixplay : MainAPI() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private data class IdAni(
|
private data class IdAni(
|
||||||
@JsonProperty("id") val id: String? = null,
|
@JsonProperty("id") val id: String? = null,
|
||||||
)
|
)
|
||||||
|
@ -354,4 +353,8 @@ class Animixplay : MainAPI() {
|
||||||
@JsonProperty("infotext") val infotext: String? = null,
|
@JsonProperty("infotext") val infotext: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private data class FullSearch(
|
||||||
|
@JsonProperty("result") val result: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue