sora: added new source

This commit is contained in:
hexated 2023-05-20 06:35:52 +07:00
parent 34bbe73786
commit b95c2c6a5c
5 changed files with 70 additions and 8 deletions

View file

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

View file

@ -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,
)
)
}
}

View file

@ -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)
}
)

View file

@ -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

View file

@ -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<String, String>? {
val doc =
app.get("${base64DecodeAPI("b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")}/search?keyword=$title").document