sora: update smashy

This commit is contained in:
hexated 2023-10-22 11:59:00 +07:00
parent c424793e9f
commit a312faa852
3 changed files with 7 additions and 9 deletions

View file

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 185
version = 186
android {
defaultConfig {

View file

@ -1718,9 +1718,7 @@ object SoraExtractor : SoraStream() {
it.attr("data-id") to it.text()
}.apmap {
when {
it.second.equals("Player F", true) || it.second.equals(
"Player N", true
) -> {
it.second.contains(Regex("(Player F|Player SE|Player N)")) -> {
invokeSmashyFfix(it.second, it.first, url, callback)
}
@ -2168,14 +2166,14 @@ object SoraExtractor : SoraStream() {
callback: (ExtractorLink) -> Unit,
) {
val ref = "https://blackvid.space/"
val key = "c3124ecca65f4e72ef5cb39033cdfed69697e94e"
val key = "b6055c533c19131a638c3d2299d525d5ec08a814"
val url = if (season == null) {
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
} else {
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
}
val data = app.get(url, timeout = 120L, referer = ref).body.bytes().decrypt(key)
val data = session.get(url, timeout = 120L, referer = ref).body.bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
val json = tryParseJson<BlackvidResponses>(data)
json?.sources?.map { source ->

View file

@ -440,7 +440,7 @@ suspend fun invokeSmashyFfix(
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
source.split(",").map { links ->
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
val quality = Regex("(?i)\\[(\\d+(?:k|p)?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
val link = links.removePrefix("[$quality]").trim()
callback.invoke(
ExtractorLink(
@ -448,8 +448,8 @@ suspend fun invokeSmashyFfix(
"Smashy [$name]",
decode(link).replace("\\/", "/"),
smashyStreamAPI,
quality?.toIntOrNull() ?: return@map,
isM3u8 = link.contains(".m3u8"),
getQualityFromName(quality),
INFER_TYPE,
)
)
}