Compare commits

..

No commits in common. "f34f268690a46a28b7eead9d793d14790933d978" and "4ed1c6a4c8d7d165c46be1bf20f5877536e92f6e" have entirely different histories.

4 changed files with 12 additions and 25 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 10
version = 9
dependencies {
implementation("com.google.code.gson:gson:2.9.0")

View file

@ -7,7 +7,6 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.models.GeneralInfo
import com.lagradost.models.GeneralInfoMovie
import com.lagradost.models.SearchModel
import org.jsoup.nodes.Element
open class UASerialProvider(url: String, name: String) : MainAPI() {
@ -54,16 +53,17 @@ open class UASerialProvider(url: String, name: String) : MainAPI() {
}
override suspend fun search(query: String): List<SearchResponse> {
val searchResult = app.get(
url = "$mainUrl/search-ajax?query=$query",
).text
val document = app.post(
url = mainUrl,
data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query.replace(" ", "+")
)
).document
val searchJson = Gson().fromJson(searchResult, SearchModel::class.java)
return searchJson.movies.map {
newMovieSearchResponse(it.name, it.link, TvType.Movie) {
this.posterUrl = "$mainUrl${it.poster}"
}
return document.select("article.short").map {
it.toSearchResponse()
}
}

View file

@ -1,13 +0,0 @@
package com.lagradost.models
import com.google.gson.annotations.SerializedName
data class SearchModel (
@SerializedName("movies") val movies : List<Movies>,
)
data class Movies (
@SerializedName("link") val link : String,
@SerializedName("name") val name : String,
@SerializedName("poster") val poster : String
)

View file

@ -19,7 +19,7 @@ cloudstream {
* 2: Slow
* 3: Beta only
* */
status = 0 // will be 3 if unspecified
status = 1 // will be 3 if unspecified
iconUrl = "https://www.google.com/s2/favicons?domain=vodnerilo.com&sz=%size%"
}