.*|\n".toRegex(), "").getIntFromText(),
+ episode.select("a em").text().toIntOrNull(),
+ episode.select("a img:nth-child(2)").attr("src")
+ )
+ }
+ newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes.distinct().sortedBy { it.episode }) {
+ this.posterUrl = posterUrl
+ this.tags = tags
+ this.year = year
+ this.plot = synopsis
+ this.recommendations = recommendations
+ addTrailer(youtubeTrailer)
+ }
+ }
+ }
+
+ override suspend fun loadLinks(
+ data: String,
+ isCasting: Boolean,
+ subtitleCallback: (SubtitleFile) -> Unit,
+ callback: (ExtractorLink) -> Unit
+ ): Boolean {
+ app.get("$data").document.select("ul#download [aria-label=\"quality\"]").forEach {
+ val name = if(it.select("span").text().contains("فائق السرعة")) "Fast Servers" else "Servers"
+ it.select("a").forEach { media ->
+ callback.invoke(
+ ExtractorLink(
+ source = this.name,
+ name = name,
+ url = media.attr("href"),
+ referer = this.mainUrl,
+ quality = media.text().getIntFromText() ?: Qualities.Unknown.value
+ )
+ )
+ }
+ }
+ return true
+ }
+}
diff --git a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/EgyBestProvider.kt b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/EgyBestProvider.kt
index d2e3462c..f12c97ad 100644
--- a/app/src/main/java/com/lagradost/cloudstream3/movieproviders/EgyBestProvider.kt
+++ b/app/src/main/java/com/lagradost/cloudstream3/movieproviders/EgyBestProvider.kt
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
+import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import org.jsoup.nodes.Element
class EgyBestProvider : MainAPI() {
@@ -78,7 +79,8 @@ class EgyBestProvider : MainAPI() {
val posterUrl = doc.select("div.movie_img a img")?.attr("src")
val year = doc.select("div.movie_title h1 a")?.text()?.toIntOrNull()
val title = doc.select("div.movie_title h1 span").text()
-
+ val youtubeTrailer = doc.select("div.play")?.attr("url")
+
val synopsis = doc.select("div.mbox").firstOrNull {
it.text().contains("القصة")
}?.text()?.replace("القصة ", "")
@@ -112,6 +114,7 @@ class EgyBestProvider : MainAPI() {
this.plot = synopsis
this.tags = tags
this.actors = actors
+ addTrailer(youtubeTrailer)
}
} else {
val episodes = ArrayList