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 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()
|
||||
}
|
||||
return newHomePageResponse(arrayListOf(HomePageList(request.name, home)), hasNext = true)
|
||||
}
|
||||
|
||||
private fun Element.toSearchResult(): SearchResponse {
|
||||
val title = this.selectFirst("a")?.attr("title")
|
||||
val link = this.selectFirst("a")?.attr("href")
|
||||
private fun Element.toSearchResult(): SearchResponse? {
|
||||
val title = this.selectFirst("a")?.attr("title") ?: return null
|
||||
val link = this.selectFirst("a")?.attr("href") ?: return null
|
||||
val image = fixUrlNull(mainUrl + this.selectFirst("img")?.attr("src")?.trim())
|
||||
|
||||
return newTvSeriesSearchResponse(title, link, TvType.TvSeries){
|
||||
|
|
Loading…
Reference in a new issue