added download source to faselhd
some people might face problems getting the links from embed so i added this
This commit is contained in:
parent
277ea990cb
commit
ee06e0e098
2 changed files with 15 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
description = ""
|
description = ""
|
||||||
|
|
|
@ -6,6 +6,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.nicehttp.requestCreator
|
import com.lagradost.nicehttp.requestCreator
|
||||||
import com.lagradost.cloudstream3.network.WebViewResolver
|
import com.lagradost.cloudstream3.network.WebViewResolver
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.network.CloudflareKiller
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class FaselHD : MainAPI() {
|
class FaselHD : MainAPI() {
|
||||||
|
@ -145,12 +147,22 @@ class FaselHD : MainAPI() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val urlToRequest = app.get(data).document.select("iframe[name=\"player_iframe\"]").attr("src")
|
val doc = app.get(data).document
|
||||||
|
val player = app.get(doc.select(".downloadLinks a").attr("href"), interceptor = CloudflareKiller(), referer = data).document
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
this.name,
|
||||||
|
this.name + "Download Source",
|
||||||
|
player.select("div.dl-link a").attr("href"),
|
||||||
|
this.mainUrl,
|
||||||
|
Qualities.Unknown.value
|
||||||
|
)
|
||||||
|
)
|
||||||
val webView = WebViewResolver(
|
val webView = WebViewResolver(
|
||||||
Regex("""master\.m3u8""")
|
Regex("""master\.m3u8""")
|
||||||
).resolveUsingWebView(
|
).resolveUsingWebView(
|
||||||
requestCreator(
|
requestCreator(
|
||||||
"GET", urlToRequest, referer = mainUrl
|
"GET", doc.select("iframe[name=\"player_iframe\"]").attr("src"), referer = mainUrl
|
||||||
)
|
)
|
||||||
).first
|
).first
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
|
|
Loading…
Reference in a new issue