mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Update EurostreamingProvider.kt
This commit is contained in:
parent
29a1e11e4e
commit
89b344b132
1 changed files with 4 additions and 4 deletions
|
@ -29,15 +29,15 @@ class EurostreamingProvider : MainAPI() {
|
||||||
val url = request.data + page
|
val url = request.data + page
|
||||||
|
|
||||||
val soup = app.get(url, interceptor = interceptor).document
|
val soup = app.get(url, interceptor = interceptor).document
|
||||||
val home = soup.select("div.post-thumb").map {
|
val home = soup.select("div.post-thumb").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(arrayListOf(HomePageList(request.name, home)), hasNext = true)
|
return newHomePageResponse(arrayListOf(HomePageList(request.name, home)), hasNext = true)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Element.toSearchResult(): SearchResponse {
|
private fun Element.toSearchResult(): SearchResponse? {
|
||||||
val title = this.selectFirst("a")?.attr("title")
|
val title = this.selectFirst("a")?.attr("title") ?: return null
|
||||||
val link = this.selectFirst("a")?.attr("href")
|
val link = this.selectFirst("a")?.attr("href") ?: return null
|
||||||
val image = fixUrlNull(mainUrl + this.selectFirst("img")?.attr("src")?.trim())
|
val image = fixUrlNull(mainUrl + this.selectFirst("img")?.attr("src")?.trim())
|
||||||
|
|
||||||
return newTvSeriesSearchResponse(title, link, TvType.TvSeries){
|
return newTvSeriesSearchResponse(title, link, TvType.TvSeries){
|
||||||
|
|
Loading…
Reference in a new issue