i think this will work
This commit is contained in:
parent
cf1f6fdc69
commit
9ab9d41f5b
1 changed files with 25 additions and 22 deletions
|
@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import com.lagradost.nicehttp.Requests
|
import com.lagradost.nicehttp.Requests
|
||||||
|
import com.lagradost.cloudstream3.newHomePageResponse as newHomePageResponse
|
||||||
|
|
||||||
class EgyBest : MainAPI() {
|
class EgyBest : MainAPI() {
|
||||||
override var lang = "ar"
|
override var lang = "ar"
|
||||||
|
@ -43,6 +44,7 @@ class EgyBest : MainAPI() {
|
||||||
quality = getQualityFromString(quality)
|
quality = getQualityFromString(quality)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
"$mainUrl/trending/?page=" to "الأفلام الأكثر مشاهدة",
|
"$mainUrl/trending/?page=" to "الأفلام الأكثر مشاهدة",
|
||||||
"$mainUrl/movies/?page=" to "أفلام جديدة",
|
"$mainUrl/movies/?page=" to "أفلام جديدة",
|
||||||
|
@ -67,7 +69,8 @@ class EgyBest : MainAPI() {
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
||||||
val doc = app.get(request.data + page).document
|
val doc = app.get(request.data + page).document
|
||||||
val list = doc.select(".movie").map { element ->
|
val list = doc.select(".movie")
|
||||||
|
.mapNotNull { element ->
|
||||||
element.toSearchResponse()
|
element.toSearchResponse()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(request.name, list)
|
return newHomePageResponse(request.name, list)
|
||||||
|
|
Loading…
Reference in a new issue