maybe a fix for faselhd
This commit is contained in:
parent
76cff3549f
commit
41c0c35f79
1 changed files with 31 additions and 22 deletions
|
@ -148,21 +148,28 @@ 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,
|
||||
this.name + "Download Source",
|
||||
this.name + " Download Source",
|
||||
player.select("div.dl-link a").attr("href"),
|
||||
this.mainUrl,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue