From b9c5a6921aa061cbc50db99a1dfe182e5d84c034 Mon Sep 17 00:00:00 2001 From: antonydp <38143733+antonydp@users.noreply.github.com> Date: Sat, 11 Jun 2022 01:55:13 +0200 Subject: [PATCH] (ready to merge) Fixed altadefinizione search, added tags (#1159) * bug fixes and add cast * fixed Altadefinizione search * fixed Altadefinizione search --- .../movieproviders/AltadefinizioneProvider.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/AltadefinizioneProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/AltadefinizioneProvider.kt index ac47d757..a0a7324b 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/AltadefinizioneProvider.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/AltadefinizioneProvider.kt @@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.* class AltadefinizioneProvider : MainAPI() { override val lang = "it" - override var mainUrl = "https://altadefinizione.limo" + override var mainUrl = "https://altadefinizione.hair" override var name = "Altadefinizione" override val hasMainPage = true override val hasChromecastSupport = true @@ -53,9 +53,11 @@ class AltadefinizioneProvider : MainAPI() { } override suspend fun search(query: String): List { - val doc = app.post("$mainUrl/index.php?do=search", data = mapOf( + val doc = app.post("$mainUrl/index.php", data = mapOf( + "do" to "search", "subaction" to "search", - "story" to query + "story" to query, + "sortby" to "news_read" )).document return doc.select("div.box").map { val title = it.selectFirst("img")!!.attr("alt") @@ -108,7 +110,7 @@ class AltadefinizioneProvider : MainAPI() { ActorData(actor = Actor(it.text())) } - + val tags: List = document.select("#details > li:nth-child(1) > a").map { it.text() } return newMovieLoadResponse( title, url, @@ -122,6 +124,7 @@ class AltadefinizioneProvider : MainAPI() { this.recommendations = recomm this.duration = null this.actors = actors + this.tags = tags } }