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,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue