mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Update SoraUtils.kt smashy (#436)
This commit is contained in:
parent
7dfce0f19e
commit
bb7e0e41c2
1 changed files with 11 additions and 8 deletions
|
@ -449,17 +449,20 @@ suspend fun invokeSmashyFfix(
|
||||||
ref: String,
|
ref: String,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest"))
|
val res = app.get(url, referer = ref).text
|
||||||
.parsedSafe<SmashySources>()
|
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
||||||
json?.sourceUrls?.map {
|
|
||||||
|
source.split(",").map { links ->
|
||||||
|
val quality = Regex("\\[(\\S+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
||||||
|
val link = links.removePrefix("[$quality]").trim()
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"Smashy [$name]",
|
"Smashy [$name]",
|
||||||
"Smashy [$name]",
|
"Smashy [$name]",
|
||||||
it,
|
decode(link).replace("\\/", "/"),
|
||||||
if(name == "Player FM") "https://vidplay.site/" else "",
|
smashyStreamAPI,
|
||||||
Qualities.P1080.value,
|
getQualityFromName(quality),
|
||||||
INFER_TYPE
|
INFER_TYPE,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1653,4 +1656,4 @@ object AESGCM {
|
||||||
dateFormat.timeZone = TimeZone.getTimeZone("GMT")
|
dateFormat.timeZone = TimeZone.getTimeZone("GMT")
|
||||||
return dateFormat.format(Date())
|
return dateFormat.format(Date())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue