From ab8d75a4e5697c2608ab57acbfc7353a550aa46a Mon Sep 17 00:00:00 2001 From: hexated Date: Sat, 19 Aug 2023 04:35:24 +0700 Subject: [PATCH] update domain --- .../main/kotlin/com/hexated/SoraExtractor.kt | 27 +++++++++++++++++++ .../src/main/kotlin/com/hexated/SoraStream.kt | 10 +++---- .../main/kotlin/com/hexated/SoraStreamLite.kt | 7 +++-- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 527338ac..4f91fc46 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -767,6 +767,33 @@ object SoraExtractor : SoraStream() { } } + suspend fun invokeVidsrcto( + imdbId: String?, + season: Int?, + episode: Int?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val url = if(season == null) { + "$vidsrctoAPI/embed/movie/$imdbId" + } else { + "$vidsrctoAPI/embed/tv/$imdbId/$season/$episode" + } + + val id = app.get(url).document.selectFirst("ul.episodes li a")?.attr("data-id") ?: return + + val subtitles = app.get("$vidsrctoAPI/ajax/embed/episode/$id/subtitles").text + tryParseJson>(subtitles)?.map { + subtitleCallback.invoke( + SubtitleFile( + it.label ?: "", + it.file ?: return@map + ) + ) + } + + } + suspend fun invokeKisskh( title: String? = null, season: Int? = null, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 0b26e62c..970288df 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -21,7 +21,6 @@ import com.hexated.SoraExtractor.invokeDoomovies import com.hexated.SoraExtractor.invokeDreamfilm import com.hexated.SoraExtractor.invokeFDMovies import com.hexated.SoraExtractor.invokeFlixon -import com.hexated.SoraExtractor.invokeFmovies import com.hexated.SoraExtractor.invokeFwatayako import com.hexated.SoraExtractor.invokeGMovies import com.hexated.SoraExtractor.invokeGoku @@ -48,6 +47,7 @@ import com.hexated.SoraExtractor.invokePobmovies import com.hexated.SoraExtractor.invokePrimewire import com.hexated.SoraExtractor.invokeTvMovies import com.hexated.SoraExtractor.invokeUhdmovies +import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeWatchOnline import com.hexated.SoraExtractor.invokeWatchsomuch import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId @@ -98,7 +98,7 @@ open class SoraStream : TmdbProvider() { const val crunchyrollAPI = "https://beta-api.crunchyroll.com" const val kissKhAPI = "https://kisskh.co" const val lingAPI = "https://ling-online.net" - const val uhdmoviesAPI = "https://uhdmovies.ink" + const val uhdmoviesAPI = "https://uhdmovies.actor" const val fwatayakoAPI = "https://5100.svetacdn.in" const val gMoviesAPI = "https://gdrivemovies.xyz" const val fdMoviesAPI = "https://freedrivemovie.lol" @@ -129,6 +129,7 @@ open class SoraStream : TmdbProvider() { const val momentAPI = "https://moment-explanation-i-244.site" const val doomoviesAPI = "https://doomovies.net" const val primewireAPI = "https://real-primewire.club" + const val vidsrctoAPI = "https://vidsrc.to" // INDEX SITE const val dahmerMoviesAPI = "https://edytjedhgmdhm.abfhaqrhbnf.workers.dev" @@ -467,9 +468,8 @@ open class SoraStream : TmdbProvider() { ) }, { - if (!res.isAnime) invokeFmovies( - res.title, - res.airedYear ?: res.year, + if (!res.isAnime) invokeVidsrcto( + res.imdbId, res.season, res.episode, subtitleCallback, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index 63cc091b..df1b3e27 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -7,7 +7,6 @@ import com.hexated.SoraExtractor.invokeDoomovies import com.hexated.SoraExtractor.invokeDreamfilm import com.hexated.SoraExtractor.invokeFilmxy import com.hexated.SoraExtractor.invokeFlixon -import com.hexated.SoraExtractor.invokeFmovies import com.hexated.SoraExtractor.invokeFwatayako import com.hexated.SoraExtractor.invokeGoku import com.hexated.SoraExtractor.invokeHDMovieBox @@ -33,6 +32,7 @@ import com.hexated.SoraExtractor.invokeMultimovies import com.hexated.SoraExtractor.invokeNetmovies import com.hexated.SoraExtractor.invokePrimewire import com.hexated.SoraExtractor.invokeVidSrc +import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeWatchOnline import com.hexated.SoraExtractor.invokeWatchsomuch import com.lagradost.cloudstream3.SubtitleFile @@ -218,9 +218,8 @@ class SoraStreamLite : SoraStream() { // ) // }, { - if (!res.isAnime) invokeFmovies( - res.title, - res.airedYear ?: res.year, + if (!res.isAnime) invokeVidsrcto( + res.imdbId, res.season, res.episode, subtitleCallback,