forked from recloudstream/cloudstream
Egybest fixes (#993)
fix for media links fix for episodes table new layout
This commit is contained in:
parent
7adc6f6cb1
commit
ea7dfdad5a
1 changed files with 35 additions and 20 deletions
|
@ -120,6 +120,20 @@ class EgyBestProvider : MainAPI() {
|
|||
}.apmap {
|
||||
val d = app.get(it).document
|
||||
val season = Regex("season-(.....)").find(it)?.groupValues?.getOrNull(1)?.getIntFromText()
|
||||
if(d.select("tr.published").isNotEmpty()) {
|
||||
d.select("tr.published").map { element ->
|
||||
val ep = Regex("ep-(.....)").find(element.select(".ep_title a").attr("href"))?.groupValues?.getOrNull(1)?.getIntFromText()
|
||||
episodes.add(
|
||||
Episode(
|
||||
element.select(".ep_title a").attr("href"),
|
||||
name = element.select("td.ep_title").html().replace(".*</span>|</a>".toRegex(), ""),
|
||||
season,
|
||||
ep,
|
||||
rating = element.select("td.tam:not(.date, .ep_len)").text().getIntFromText()
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
d.select("#mainLoad > div:nth-child(3) > div.movies_small a").map { eit ->
|
||||
val ep = Regex("ep-(.....)").find(eit.attr("href"))?.groupValues?.getOrNull(1)?.getIntFromText()
|
||||
episodes.add(
|
||||
|
@ -132,6 +146,7 @@ class EgyBestProvider : MainAPI() {
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes.distinct().sortedBy { it.episode }) {
|
||||
this.posterUrl = posterUrl
|
||||
this.tags = tags
|
||||
|
@ -151,7 +166,7 @@ class EgyBestProvider : MainAPI() {
|
|||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
val requestJSON = app.get("https://zawmedia-api.herokuapp.com/egybest?url=$data").text
|
||||
val requestJSON = app.get("https://api.zr5.repl.co/egybest?url=$data").text
|
||||
val jsonArray = parseJson<List<Sources>>(requestJSON)
|
||||
for (i in jsonArray) {
|
||||
val quality = i.quality
|
||||
|
@ -159,10 +174,10 @@ class EgyBestProvider : MainAPI() {
|
|||
callback.invoke(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
this.name + " ${quality}p",
|
||||
this.name,
|
||||
link,
|
||||
this.mainUrl,
|
||||
2,
|
||||
quality!!,
|
||||
true
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue