mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
removed Youtube from UniqueStream
This commit is contained in:
parent
78a9893648
commit
de52441ad0
1 changed files with 32 additions and 28 deletions
|
@ -539,37 +539,41 @@ object SoraExtractor : SoraStream() {
|
||||||
referer = url
|
referer = url
|
||||||
).parsed<ResponseHash>().embed_url.let { fixUrl(it) }
|
).parsed<ResponseHash>().embed_url.let { fixUrl(it) }
|
||||||
|
|
||||||
if (source.contains("uniquestream")) {
|
when {
|
||||||
val resDoc = app.get(
|
source.contains("uniquestream") -> {
|
||||||
source, referer = "$uniqueStreamAPI/", headers = mapOf(
|
val resDoc = app.get(
|
||||||
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
|
source, referer = "$uniqueStreamAPI/", headers = mapOf(
|
||||||
)
|
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
|
||||||
).document
|
)
|
||||||
val srcm3u8 = resDoc.selectFirst("script:containsData(let url =)")?.data()?.let {
|
).document
|
||||||
Regex("['|\"](.*?.m3u8)['|\"]").find(it)?.groupValues?.getOrNull(1)
|
val srcm3u8 = resDoc.selectFirst("script:containsData(let url =)")?.data()?.let {
|
||||||
} ?: return@apmap null
|
Regex("['|\"](.*?.m3u8)['|\"]").find(it)?.groupValues?.getOrNull(1)
|
||||||
val quality = app.get(
|
} ?: return@apmap null
|
||||||
srcm3u8, referer = source, headers = mapOf(
|
val quality = app.get(
|
||||||
"Accept" to "*/*",
|
srcm3u8, referer = source, headers = mapOf(
|
||||||
)
|
|
||||||
).text.let { quality ->
|
|
||||||
if (quality.contains("RESOLUTION=1920")) Qualities.P1080.value else Qualities.P720.value
|
|
||||||
}
|
|
||||||
callback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
"UniqueStream",
|
|
||||||
"UniqueStream",
|
|
||||||
srcm3u8,
|
|
||||||
source,
|
|
||||||
quality,
|
|
||||||
true,
|
|
||||||
headers = mapOf(
|
|
||||||
"Accept" to "*/*",
|
"Accept" to "*/*",
|
||||||
)
|
)
|
||||||
|
).text.let { quality ->
|
||||||
|
if (quality.contains("RESOLUTION=1920")) Qualities.P1080.value else Qualities.P720.value
|
||||||
|
}
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
"UniqueStream",
|
||||||
|
"UniqueStream",
|
||||||
|
srcm3u8,
|
||||||
|
source,
|
||||||
|
quality,
|
||||||
|
true,
|
||||||
|
headers = mapOf(
|
||||||
|
"Accept" to "*/*",
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
} else {
|
!source.contains("youtube") -> loadExtractor(source, "$uniqueStreamAPI/", subtitleCallback, callback)
|
||||||
loadExtractor(source, "$uniqueStreamAPI/", subtitleCallback, callback)
|
else -> {
|
||||||
|
// pass
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue