Update Vidmoly.kt (#1051)

This commit is contained in:
Ömer Faruk Sancak 2024-04-22 02:14:36 +03:00 committed by GitHub
parent e01ff4d843
commit 4399a612df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,9 +25,13 @@ open class Vidmoly : ExtractorApi() {
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val headers = mapOf(
"User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36",
"Sec-Fetch-Dest" to "iframe"
)
val script = app.get( val script = app.get(
url, url,
headers = headers,
referer = referer, referer = referer,
).document.select("script") ).document.select("script")
.find { it.data().contains("sources:") }?.data() .find { it.data().contains("sources:") }?.data()