Compare commits
2 commits
4ed1c6a4c8
...
f34f268690
Author | SHA1 | Date | |
---|---|---|---|
f34f268690 | |||
d265f92a0d |
4 changed files with 25 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 9
|
version = 10
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.google.code.gson:gson:2.9.0")
|
implementation("com.google.code.gson:gson:2.9.0")
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
import com.lagradost.models.GeneralInfo
|
import com.lagradost.models.GeneralInfo
|
||||||
import com.lagradost.models.GeneralInfoMovie
|
import com.lagradost.models.GeneralInfoMovie
|
||||||
|
import com.lagradost.models.SearchModel
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
open class UASerialProvider(url: String, name: String) : MainAPI() {
|
open class UASerialProvider(url: String, name: String) : MainAPI() {
|
||||||
|
@ -53,17 +54,16 @@ open class UASerialProvider(url: String, name: String) : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val document = app.post(
|
val searchResult = app.get(
|
||||||
url = mainUrl,
|
url = "$mainUrl/search-ajax?query=$query",
|
||||||
data = mapOf(
|
).text
|
||||||
"do" to "search",
|
|
||||||
"subaction" to "search",
|
|
||||||
"story" to query.replace(" ", "+")
|
|
||||||
)
|
|
||||||
).document
|
|
||||||
|
|
||||||
return document.select("article.short").map {
|
val searchJson = Gson().fromJson(searchResult, SearchModel::class.java)
|
||||||
it.toSearchResponse()
|
|
||||||
|
return searchJson.movies.map {
|
||||||
|
newMovieSearchResponse(it.name, it.link, TvType.Movie) {
|
||||||
|
this.posterUrl = "$mainUrl${it.poster}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
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
|
||||||
|
)
|
|
@ -19,7 +19,7 @@ cloudstream {
|
||||||
* 2: Slow
|
* 2: Slow
|
||||||
* 3: Beta only
|
* 3: Beta only
|
||||||
* */
|
* */
|
||||||
status = 1 // will be 3 if unspecified
|
status = 0 // will be 3 if unspecified
|
||||||
|
|
||||||
iconUrl = "https://www.google.com/s2/favicons?domain=vodnerilo.com&sz=%size%"
|
iconUrl = "https://www.google.com/s2/favicons?domain=vodnerilo.com&sz=%size%"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue