diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 61db346f..9cc8a87c 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 130 +version = 131 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 80dfeafa..d3aa8a53 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1916,13 +1916,16 @@ object SoraExtractor : SoraStream() { }.apmap { when { it.first.contains("/ffix") -> { - invokeSmashyOne(it.second, it.first, callback) + invokeSmashyFfix(it.second, it.first, callback) } it.first.contains("/gtop") -> { - invokeSmashyTwo(it.second, it.first, callback) + invokeSmashyGtop(it.second, it.first, callback) } it.first.contains("/dude_tv") -> { - invokeSmashyThree(it.second, it.first, callback) + invokeSmashyDude(it.second, it.first, callback) + } + it.first.contains("/nflim") -> { + invokeSmashyNflim(it.second, it.first, callback) } else -> return@apmap } @@ -2932,6 +2935,24 @@ object SoraExtractor : SoraStream() { } + suspend fun invokeNowTv( + tmdbId: Int? = null, + callback: (ExtractorLink) -> Unit + ) { + val referer = "https://2now.tv/" + val url = "$nowTvAPI/$tmdbId.mp4" + if(!app.get(url, referer = referer).isSuccessful) return + callback.invoke( + ExtractorLink( + "NowTv", + "NowTv", + url, + referer, + Qualities.P1080.value, + ) + ) + } + } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 6980899a..c4a7620a 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -40,6 +40,7 @@ import com.hexated.SoraExtractor.invokeMovie123Net import com.hexated.SoraExtractor.invokeMoviesbay import com.hexated.SoraExtractor.invokeMoviezAdd import com.hexated.SoraExtractor.invokeNinetv +import com.hexated.SoraExtractor.invokeNowTv import com.hexated.SoraExtractor.invokePapaonMovies1 import com.hexated.SoraExtractor.invokePapaonMovies2 import com.hexated.SoraExtractor.invokePutlocker @@ -125,6 +126,7 @@ open class SoraStream : TmdbProvider() { const val nineTvAPI = "https://api.9animetv.live" const val putlockerAPI = "https://ww7.putlocker.vip" const val fmoviesAPI = "https://fmovies.to" + const val nowTvAPI = "https://myfilestorage.xyz" // INDEX SITE const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:" @@ -771,6 +773,9 @@ open class SoraStream : TmdbProvider() { res.episode, callback ) + }, + { + if (!res.isAnime && res.season == null) invokeNowTv(res.id, callback) } ) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index a9341433..dfcc9968 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -18,6 +18,7 @@ import com.hexated.SoraExtractor.invokeM4uhd import com.hexated.SoraExtractor.invokeMovie123Net import com.hexated.SoraExtractor.invokeMovieHab import com.hexated.SoraExtractor.invokeNinetv +import com.hexated.SoraExtractor.invokeNowTv import com.hexated.SoraExtractor.invokePutlocker import com.hexated.SoraExtractor.invokeRStream import com.hexated.SoraExtractor.invokeSeries9 @@ -245,6 +246,9 @@ class SoraStreamLite : SoraStream() { callback ) }, + { + if (!res.isAnime && res.season == null) invokeNowTv(res.id, callback) + } ) return true diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 4ea8f3a8..07bb476d 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -27,7 +27,6 @@ import okhttp3.Headers import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody -import okio.ByteString.Companion.encode import org.jsoup.nodes.Document import java.net.URI import java.net.URL @@ -458,7 +457,7 @@ suspend fun invokeVizcloud( } } -suspend fun invokeSmashyOne( +suspend fun invokeSmashyFfix( name: String, url: String, callback: (ExtractorLink) -> Unit, @@ -488,7 +487,7 @@ suspend fun invokeSmashyOne( } -suspend fun invokeSmashyTwo( +suspend fun invokeSmashyGtop( name: String, url: String, callback: (ExtractorLink) -> Unit @@ -522,7 +521,7 @@ suspend fun invokeSmashyTwo( ) } -suspend fun invokeSmashyThree( +suspend fun invokeSmashyDude( name: String, url: String, callback: (ExtractorLink) -> Unit @@ -542,6 +541,39 @@ suspend fun invokeSmashyThree( } +suspend fun invokeSmashyNflim( + name: String, + url: String, + callback: (ExtractorLink) -> Unit, +) { + val script = + app.get(url).document.selectFirst("script:containsData(player =)")?.data() ?: return + + val source = + Regex("file:\\s*\"([^\"]+)").find(script)?.groupValues?.get( + 1 + ) ?: return + + source.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.substringAfter("url=").substringBefore("&cookie=").trim(), + "", + quality?.toIntOrNull() ?: return@map, + isM3u8 = true, + headers = mapOf( + "Cookie" to trimmedLink.substringAfter("&cookie=").trim() + ) + ) + ) + } + +} + suspend fun getSoraIdAndType(title: String?, year: Int?, season: Int?): Pair? { val doc = app.get("${base64DecodeAPI("b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")}/search?keyword=$title").document