mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: bump
This commit is contained in:
parent
1e98fbc383
commit
2e7789e4e8
3 changed files with 1 additions and 45 deletions
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 140
|
version = 141
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1972,9 +1972,6 @@ object SoraExtractor : SoraStream() {
|
||||||
it.first.contains("/dude_tv") -> {
|
it.first.contains("/dude_tv") -> {
|
||||||
invokeSmashyDude(it.second, it.first, callback)
|
invokeSmashyDude(it.second, it.first, callback)
|
||||||
}
|
}
|
||||||
it.first.contains("/nflim") -> {
|
|
||||||
invokeSmashyNflim(it.second, it.first, subtitleCallback, callback)
|
|
||||||
}
|
|
||||||
it.first.contains("/rip") -> {
|
it.first.contains("/rip") -> {
|
||||||
invokeSmashyRip(it.second, it.first, subtitleCallback, callback)
|
invokeSmashyRip(it.second, it.first, subtitleCallback, callback)
|
||||||
}
|
}
|
||||||
|
|
|
@ -518,47 +518,6 @@ suspend fun invokeSmashyDude(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeSmashyNflim(
|
|
||||||
name: String,
|
|
||||||
url: String,
|
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
|
||||||
callback: (ExtractorLink) -> Unit,
|
|
||||||
) {
|
|
||||||
val script =
|
|
||||||
app.get(url).document.selectFirst("script:containsData(player =)")?.data() ?: return
|
|
||||||
|
|
||||||
val sources = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
|
|
||||||
val subtitles = Regex("['\"]?subtitle['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
|
|
||||||
|
|
||||||
sources.split(",").map { links ->
|
|
||||||
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
|
||||||
val trimmedLink = links.removePrefix("[$quality]").trim()
|
|
||||||
callback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
"Smashy [$name]",
|
|
||||||
"Smashy [$name]",
|
|
||||||
trimmedLink,
|
|
||||||
"",
|
|
||||||
quality?.toIntOrNull() ?: return@map,
|
|
||||||
isM3u8 = true,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
subtitles.split(",").map { sub ->
|
|
||||||
val lang = Regex("\\[(.*?)]").find(sub)?.groupValues?.getOrNull(1)?.trim() ?: return@map
|
|
||||||
val trimmedSubLink = sub.removePrefix("[$lang]").trim().substringAfter("?url=")
|
|
||||||
if(lang.contains("\\u")) return@map
|
|
||||||
subtitleCallback.invoke(
|
|
||||||
SubtitleFile(
|
|
||||||
lang,
|
|
||||||
trimmedSubLink
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun invokeSmashyRip(
|
suspend fun invokeSmashyRip(
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
|
|
Loading…
Reference in a new issue