2
1
Fork 1
mirror of https://github.com/yoyzo/arab synced 2024-08-15 03:15:00 +00:00

maybe a fix for faselhd

This commit is contained in:
Zaw 2022-09-01 12:02:44 +03:00
parent 76cff3549f
commit 41c0c35f79

View file

@ -148,7 +148,13 @@ class FaselHD : MainAPI() {
callback: (ExtractorLink) -> Unit
): Boolean {
val doc = app.get(data).document
val player = app.get(doc.select(".downloadLinks a").attr("href"), interceptor = CloudflareKiller(), referer = data).document
listOf(
doc.select(".downloadLinks a").attr("href") to "download",
doc.select("iframe[name=\"player_iframe\"]").attr("src") to "iframe"
).apmap { (url, method) ->
if(method == "download") {
val player = app.get(url, interceptor = CloudflareKiller(), referer = mainUrl).document
println(player)
callback.invoke(
ExtractorLink(
this.name,
@ -158,11 +164,12 @@ class FaselHD : MainAPI() {
Qualities.Unknown.value
)
)
} else if(method == "iframe") {
val webView = WebViewResolver(
Regex("""master\.m3u8""")
).resolveUsingWebView(
requestCreator(
"GET", doc.select("iframe[name=\"player_iframe\"]").attr("src"), referer = mainUrl
"GET", url, referer = mainUrl
)
).first
M3u8Helper.generateM3u8(
@ -170,6 +177,8 @@ class FaselHD : MainAPI() {
webView?.url.toString(),
referer = mainUrl
).forEach(callback)
}
}
return true
}
}