mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix Vidcloud & Upcloud
This commit is contained in:
parent
eae807a4f3
commit
cecf322fad
4 changed files with 88 additions and 88 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 = 137
|
version = 138
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -15,50 +15,91 @@ import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import okio.ByteString.Companion.encode
|
import okio.ByteString.Companion.encode
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
val session = Session(Requests().baseClient)
|
val session = Session(Requests().baseClient)
|
||||||
|
|
||||||
object SoraExtractor : SoraStream() {
|
object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
suspend fun invokeTwoEmbed(
|
suspend fun invokeGoku(
|
||||||
id: Int? = null,
|
title: String? = null,
|
||||||
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
lastSeason: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val url = if (season == null) {
|
val headers = mapOf(
|
||||||
"$twoEmbedAPI/embed/tmdb/movie?id=$id"
|
"X-Requested-With" to "XMLHttpRequest"
|
||||||
} else {
|
)
|
||||||
"$twoEmbedAPI/embed/tmdb/tv?id=$id&s=$season&e=$episode"
|
|
||||||
}
|
|
||||||
val document = app.get(url).document
|
|
||||||
val captchaKey =
|
|
||||||
document.select("script[src*=https://www.google.com/recaptcha/api.js?render=]")
|
|
||||||
.attr("src").substringAfter("render=")
|
|
||||||
|
|
||||||
document.select(".dropdown-menu a[data-id]").map { it.attr("data-id") }.apmap { serverID ->
|
fun Document.getServers(): List<String> {
|
||||||
val token = APIHolder.getCaptchaToken(url, captchaKey)
|
return this.select("a").map { it.attr("data-id") }
|
||||||
|
}
|
||||||
|
|
||||||
|
val media = app.get(
|
||||||
|
"$gokuAPI/ajax/movie/search?keyword=$title", headers = headers
|
||||||
|
).document.select("div.item").find { ele ->
|
||||||
|
val url = ele.selectFirst("a")?.attr("href")
|
||||||
|
val titleMedia = ele.select("h3.movie-name").text()
|
||||||
|
val yearMedia =
|
||||||
|
ele.selectFirst("div.info-split > div:first-child")?.text()?.toIntOrNull()
|
||||||
|
val lastSeasonMedia =
|
||||||
|
ele.selectFirst("div.info-split > div:nth-child(2)")?.text()?.substringAfter("SS")
|
||||||
|
?.substringBefore("/")?.toIntOrNull()
|
||||||
|
titleMedia.equals(title, true) || titleMedia.createSlug().equals(title.createSlug()) &&
|
||||||
|
if (season == null) {
|
||||||
|
yearMedia == year && url?.contains("/series/") == true
|
||||||
|
} else {
|
||||||
|
lastSeasonMedia == lastSeason && url?.contains("/movie/") == true
|
||||||
|
}
|
||||||
|
} ?: return
|
||||||
|
|
||||||
|
val serversId = if (season == null) {
|
||||||
|
val movieId = app.get(
|
||||||
|
fixUrl(
|
||||||
|
media.selectFirst("a")?.attr("href") ?: return,
|
||||||
|
gokuAPI
|
||||||
|
)
|
||||||
|
).url.substringAfterLast("/")
|
||||||
app.get(
|
app.get(
|
||||||
"$twoEmbedAPI/ajax/embed/play?id=$serverID&_token=$token", referer = url
|
"$gokuAPI/ajax/movie/episode/servers/$movieId",
|
||||||
).parsedSafe<EmbedJson>()?.let { source ->
|
headers = headers
|
||||||
val link = source.link ?: return@let
|
).document.getServers()
|
||||||
if (link.contains("rabbitstream")) {
|
} else {
|
||||||
extractRabbitStream(
|
val seasonId = app.get(
|
||||||
"Vidcloud",
|
"$gokuAPI/ajax/movie/seasons/${
|
||||||
link,
|
media.selectFirst("a.btn-wl")?.attr("data-id") ?: return
|
||||||
"$twoEmbedAPI/",
|
}", headers = headers
|
||||||
subtitleCallback,
|
).document.select("a.ss-item").find { it.ownText().equals("Season $season", true) }?.attr("data-id")
|
||||||
callback,
|
val episodeId =
|
||||||
false,
|
app.get(
|
||||||
decryptKey = RabbitStream.getKey()
|
"$gokuAPI/ajax/movie/season/episodes/${seasonId ?: return}",
|
||||||
) { it }
|
headers = headers
|
||||||
} else {
|
).document.select("div.item").find {
|
||||||
loadExtractor(
|
it.selectFirst("strong")?.text().equals("Eps $episode:", true)
|
||||||
link, twoEmbedAPI, subtitleCallback, callback
|
}?.selectFirst("a")?.attr("data-id")
|
||||||
)
|
|
||||||
}
|
app.get(
|
||||||
}
|
"$gokuAPI/ajax/movie/episode/servers/${episodeId ?: return}",
|
||||||
|
headers = headers
|
||||||
|
).document.getServers()
|
||||||
|
}
|
||||||
|
|
||||||
|
serversId.apmap { id ->
|
||||||
|
val iframe =
|
||||||
|
app.get("$gokuAPI/ajax/movie/episode/server/sources/$id", headers = headers)
|
||||||
|
.parsedSafe<GokuServer>()?.data?.link ?: return@apmap
|
||||||
|
extractRabbitStream(
|
||||||
|
if (iframe.contains("rabbitstream")) "Vidcloud" else "Upcloud",
|
||||||
|
iframe,
|
||||||
|
"$gokuAPI/",
|
||||||
|
subtitleCallback,
|
||||||
|
callback,
|
||||||
|
false,
|
||||||
|
decryptKey = RabbitStream.getKey()
|
||||||
|
) { it }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2905,36 +2946,6 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeUpcloud(
|
|
||||||
imdbId: String? = null,
|
|
||||||
season: Int? = null,
|
|
||||||
episode: Int? = null,
|
|
||||||
callback: (ExtractorLink) -> Unit
|
|
||||||
) {
|
|
||||||
val apiUrl =
|
|
||||||
base64DecodeAPI("dWI=Y2w=cC4=bXU=ZWE=LWI=Ynk=YmE=bS4=ZWE=dHI=ZXM=aW4=LWM=NDA=MDg=NjE=YmQ=Y2I=MmU=Ly8=czo=dHA=aHQ=")
|
|
||||||
val url = if (season == null) {
|
|
||||||
"$apiUrl/stream/movie/$imdbId.json"
|
|
||||||
} else {
|
|
||||||
"$apiUrl/stream/series/$imdbId:$season:$episode.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
app.get(url).parsedSafe<CryMoviesResponse>()?.streams?.map { stream ->
|
|
||||||
callback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
"Upcloud",
|
|
||||||
"Upcloud",
|
|
||||||
stream.url ?: return@map,
|
|
||||||
"",
|
|
||||||
stream.description?.toIntOrNull() ?: Qualities.Unknown.value,
|
|
||||||
headers = stream.behaviorHints?.proxyHeaders?.request ?: mapOf(),
|
|
||||||
isM3u8 = true
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun invokeNowTv(
|
suspend fun invokeNowTv(
|
||||||
tmdbId: Int? = null,
|
tmdbId: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
|
@ -3401,3 +3412,11 @@ data class ZoroResponses(
|
||||||
data class MalSyncRes(
|
data class MalSyncRes(
|
||||||
@JsonProperty("Sites") val Sites: Map<String, Map<String, Map<String, String>>>? = null,
|
@JsonProperty("Sites") val Sites: Map<String, Map<String, Map<String, String>>>? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class GokuData(
|
||||||
|
@JsonProperty("link") val link: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class GokuServer(
|
||||||
|
@JsonProperty("data") val data: GokuData? = GokuData(),
|
||||||
|
)
|
|
@ -15,7 +15,6 @@ import com.hexated.SoraExtractor.invokeKimcartoon
|
||||||
import com.hexated.SoraExtractor.invokeMovieHab
|
import com.hexated.SoraExtractor.invokeMovieHab
|
||||||
import com.hexated.SoraExtractor.invokeNoverse
|
import com.hexated.SoraExtractor.invokeNoverse
|
||||||
import com.hexated.SoraExtractor.invokeSeries9
|
import com.hexated.SoraExtractor.invokeSeries9
|
||||||
import com.hexated.SoraExtractor.invokeTwoEmbed
|
|
||||||
import com.hexated.SoraExtractor.invokeVidSrc
|
import com.hexated.SoraExtractor.invokeVidSrc
|
||||||
import com.hexated.SoraExtractor.invokeXmovies
|
import com.hexated.SoraExtractor.invokeXmovies
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
@ -30,6 +29,7 @@ import com.hexated.SoraExtractor.invokeFmovies
|
||||||
import com.hexated.SoraExtractor.invokeFwatayako
|
import com.hexated.SoraExtractor.invokeFwatayako
|
||||||
import com.hexated.SoraExtractor.invokeGMovies
|
import com.hexated.SoraExtractor.invokeGMovies
|
||||||
import com.hexated.SoraExtractor.invokeGdbotMovies
|
import com.hexated.SoraExtractor.invokeGdbotMovies
|
||||||
|
import com.hexated.SoraExtractor.invokeGoku
|
||||||
import com.hexated.SoraExtractor.invokeGomovies
|
import com.hexated.SoraExtractor.invokeGomovies
|
||||||
import com.hexated.SoraExtractor.invokeJmdkhMovies
|
import com.hexated.SoraExtractor.invokeJmdkhMovies
|
||||||
import com.hexated.SoraExtractor.invokeKisskh
|
import com.hexated.SoraExtractor.invokeKisskh
|
||||||
|
@ -50,7 +50,6 @@ import com.hexated.SoraExtractor.invokeSmashyStream
|
||||||
import com.hexated.SoraExtractor.invokeSoraStream
|
import com.hexated.SoraExtractor.invokeSoraStream
|
||||||
import com.hexated.SoraExtractor.invokeTvMovies
|
import com.hexated.SoraExtractor.invokeTvMovies
|
||||||
import com.hexated.SoraExtractor.invokeUhdmovies
|
import com.hexated.SoraExtractor.invokeUhdmovies
|
||||||
import com.hexated.SoraExtractor.invokeUpcloud
|
|
||||||
import com.hexated.SoraExtractor.invokeVitoenMovies
|
import com.hexated.SoraExtractor.invokeVitoenMovies
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||||
|
@ -85,7 +84,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL
|
base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL
|
||||||
|
|
||||||
/** ALL SOURCES */
|
/** ALL SOURCES */
|
||||||
const val twoEmbedAPI = "https://www.2embed.to"
|
|
||||||
const val vidSrcAPI = "https://v2.vidsrc.me"
|
const val vidSrcAPI = "https://v2.vidsrc.me"
|
||||||
const val dbgoAPI = "https://dbgo.fun"
|
const val dbgoAPI = "https://dbgo.fun"
|
||||||
const val movieHabAPI = "https://moviehab.com"
|
const val movieHabAPI = "https://moviehab.com"
|
||||||
|
@ -117,8 +115,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val movie123NetAPI = "https://ww8.0123movie.net"
|
const val movie123NetAPI = "https://ww8.0123movie.net"
|
||||||
const val smashyStreamAPI = "https://embed.smashystream.com"
|
const val smashyStreamAPI = "https://embed.smashystream.com"
|
||||||
const val watchSomuchAPI = "https://watchsomuch.tv" // sub only
|
const val watchSomuchAPI = "https://watchsomuch.tv" // sub only
|
||||||
val gomoviesAPI =
|
val gomoviesAPI = base64DecodeAPI("bQ==Y28=ZS4=aW4=bmw=LW8=ZXM=dmk=bW8=Z28=Ly8=czo=dHA=aHQ=")
|
||||||
base64DecodeAPI("bQ==Y28=ZS4=aW4=bmw=LW8=ZXM=dmk=bW8=Z28=Ly8=czo=dHA=aHQ=")
|
|
||||||
const val ask4MoviesAPI = "https://ask4movie.net"
|
const val ask4MoviesAPI = "https://ask4movie.net"
|
||||||
const val biliBiliAPI = "https://api-vn.kaguya.app/server"
|
const val biliBiliAPI = "https://api-vn.kaguya.app/server"
|
||||||
const val watchOnlineAPI = "https://watchonline.ag"
|
const val watchOnlineAPI = "https://watchonline.ag"
|
||||||
|
@ -126,6 +123,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
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"
|
const val nowTvAPI = "https://myfilestorage.xyz"
|
||||||
|
const val gokuAPI = "https://goku.sx"
|
||||||
|
|
||||||
// INDEX SITE
|
// INDEX SITE
|
||||||
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
|
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
|
||||||
|
@ -388,7 +386,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeTwoEmbed(res.id, res.season, res.episode, subtitleCallback, callback)
|
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
|
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
|
||||||
|
@ -566,14 +564,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
if (!res.isAnime) invokeUpcloud(
|
|
||||||
res.imdbId,
|
|
||||||
res.season,
|
|
||||||
res.episode,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
invokePutlocker(res.title, res.year, res.season, res.episode, callback)
|
invokePutlocker(res.title, res.year, res.season, res.episode, callback)
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.hexated.SoraExtractor.invokeFilmxy
|
||||||
import com.hexated.SoraExtractor.invokeFlixon
|
import com.hexated.SoraExtractor.invokeFlixon
|
||||||
import com.hexated.SoraExtractor.invokeFmovies
|
import com.hexated.SoraExtractor.invokeFmovies
|
||||||
import com.hexated.SoraExtractor.invokeFwatayako
|
import com.hexated.SoraExtractor.invokeFwatayako
|
||||||
|
import com.hexated.SoraExtractor.invokeGoku
|
||||||
import com.hexated.SoraExtractor.invokeGomovies
|
import com.hexated.SoraExtractor.invokeGomovies
|
||||||
import com.hexated.SoraExtractor.invokeHDMovieBox
|
import com.hexated.SoraExtractor.invokeHDMovieBox
|
||||||
import com.hexated.SoraExtractor.invokeIdlix
|
import com.hexated.SoraExtractor.invokeIdlix
|
||||||
|
@ -24,8 +25,6 @@ import com.hexated.SoraExtractor.invokeRStream
|
||||||
import com.hexated.SoraExtractor.invokeSeries9
|
import com.hexated.SoraExtractor.invokeSeries9
|
||||||
import com.hexated.SoraExtractor.invokeSmashyStream
|
import com.hexated.SoraExtractor.invokeSmashyStream
|
||||||
import com.hexated.SoraExtractor.invokeSoraStream
|
import com.hexated.SoraExtractor.invokeSoraStream
|
||||||
import com.hexated.SoraExtractor.invokeTwoEmbed
|
|
||||||
import com.hexated.SoraExtractor.invokeUpcloud
|
|
||||||
import com.hexated.SoraExtractor.invokeVidSrc
|
import com.hexated.SoraExtractor.invokeVidSrc
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||||
|
@ -85,7 +84,7 @@ class SoraStreamLite : SoraStream() {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeTwoEmbed(res.id, res.season, res.episode, subtitleCallback, callback)
|
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
|
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
|
||||||
|
@ -197,14 +196,6 @@ class SoraStreamLite : SoraStream() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
if (!res.isAnime) invokeUpcloud(
|
|
||||||
res.imdbId,
|
|
||||||
res.season,
|
|
||||||
res.episode,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
invokeXmovies(
|
invokeXmovies(
|
||||||
res.title,
|
res.title,
|
||||||
|
|
Loading…
Reference in a new issue