mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added new source
This commit is contained in:
parent
34bbe73786
commit
b95c2c6a5c
5 changed files with 70 additions and 8 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 = 130
|
version = 131
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1916,13 +1916,16 @@ object SoraExtractor : SoraStream() {
|
||||||
}.apmap {
|
}.apmap {
|
||||||
when {
|
when {
|
||||||
it.first.contains("/ffix") -> {
|
it.first.contains("/ffix") -> {
|
||||||
invokeSmashyOne(it.second, it.first, callback)
|
invokeSmashyFfix(it.second, it.first, callback)
|
||||||
}
|
}
|
||||||
it.first.contains("/gtop") -> {
|
it.first.contains("/gtop") -> {
|
||||||
invokeSmashyTwo(it.second, it.first, callback)
|
invokeSmashyGtop(it.second, it.first, callback)
|
||||||
}
|
}
|
||||||
it.first.contains("/dude_tv") -> {
|
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
|
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,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ import com.hexated.SoraExtractor.invokeMovie123Net
|
||||||
import com.hexated.SoraExtractor.invokeMoviesbay
|
import com.hexated.SoraExtractor.invokeMoviesbay
|
||||||
import com.hexated.SoraExtractor.invokeMoviezAdd
|
import com.hexated.SoraExtractor.invokeMoviezAdd
|
||||||
import com.hexated.SoraExtractor.invokeNinetv
|
import com.hexated.SoraExtractor.invokeNinetv
|
||||||
|
import com.hexated.SoraExtractor.invokeNowTv
|
||||||
import com.hexated.SoraExtractor.invokePapaonMovies1
|
import com.hexated.SoraExtractor.invokePapaonMovies1
|
||||||
import com.hexated.SoraExtractor.invokePapaonMovies2
|
import com.hexated.SoraExtractor.invokePapaonMovies2
|
||||||
import com.hexated.SoraExtractor.invokePutlocker
|
import com.hexated.SoraExtractor.invokePutlocker
|
||||||
|
@ -125,6 +126,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val nineTvAPI = "https://api.9animetv.live"
|
const val nineTvAPI = "https://api.9animetv.live"
|
||||||
const val putlockerAPI = "https://ww7.putlocker.vip"
|
const val putlockerAPI = "https://ww7.putlocker.vip"
|
||||||
const val fmoviesAPI = "https://fmovies.to"
|
const val fmoviesAPI = "https://fmovies.to"
|
||||||
|
const val nowTvAPI = "https://myfilestorage.xyz"
|
||||||
|
|
||||||
// INDEX SITE
|
// INDEX SITE
|
||||||
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
|
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
|
||||||
|
@ -771,6 +773,9 @@ open class SoraStream : TmdbProvider() {
|
||||||
res.episode,
|
res.episode,
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
if (!res.isAnime && res.season == null) invokeNowTv(res.id, callback)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.hexated.SoraExtractor.invokeM4uhd
|
||||||
import com.hexated.SoraExtractor.invokeMovie123Net
|
import com.hexated.SoraExtractor.invokeMovie123Net
|
||||||
import com.hexated.SoraExtractor.invokeMovieHab
|
import com.hexated.SoraExtractor.invokeMovieHab
|
||||||
import com.hexated.SoraExtractor.invokeNinetv
|
import com.hexated.SoraExtractor.invokeNinetv
|
||||||
|
import com.hexated.SoraExtractor.invokeNowTv
|
||||||
import com.hexated.SoraExtractor.invokePutlocker
|
import com.hexated.SoraExtractor.invokePutlocker
|
||||||
import com.hexated.SoraExtractor.invokeRStream
|
import com.hexated.SoraExtractor.invokeRStream
|
||||||
import com.hexated.SoraExtractor.invokeSeries9
|
import com.hexated.SoraExtractor.invokeSeries9
|
||||||
|
@ -245,6 +246,9 @@ class SoraStreamLite : SoraStream() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
if (!res.isAnime && res.season == null) invokeNowTv(res.id, callback)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -27,7 +27,6 @@ import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import okio.ByteString.Companion.encode
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
|
@ -458,7 +457,7 @@ suspend fun invokeVizcloud(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeSmashyOne(
|
suspend fun invokeSmashyFfix(
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
@ -488,7 +487,7 @@ suspend fun invokeSmashyOne(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeSmashyTwo(
|
suspend fun invokeSmashyGtop(
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
|
@ -522,7 +521,7 @@ suspend fun invokeSmashyTwo(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeSmashyThree(
|
suspend fun invokeSmashyDude(
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
callback: (ExtractorLink) -> Unit
|
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>? {
|
suspend fun getSoraIdAndType(title: String?, year: Int?, season: Int?): Pair<String, String>? {
|
||||||
val doc =
|
val doc =
|
||||||
app.get("${base64DecodeAPI("b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")}/search?keyword=$title").document
|
app.get("${base64DecodeAPI("b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")}/search?keyword=$title").document
|
||||||
|
|
Loading…
Reference in a new issue