diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 10dc59bc..ee899967 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 = 164 +version = 165 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 0f2d1d83..bf84c606 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -234,92 +234,6 @@ object SoraExtractor : SoraStream() { } } - suspend fun invokeHDMovieBox( - title: String? = null, - season: Int? = null, - episode: Int? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val fixTitle = title.createSlug() - val url = "$hdMovieBoxAPI/watch/$fixTitle" - val doc = app.get(url).document - val id = if (season == null) { - doc.selectFirst("div.player div#not-loaded")?.attr("data-whatwehave") - } else { - doc.select("div.season-list-column div[data-season=$season] div.list div.item")[episode?.minus( - 1 - ) ?: 0].selectFirst("div.ui.checkbox")?.attr("data-episode") - } ?: return - - val iframeUrl = app.post( - "$hdMovieBoxAPI/ajax/service", data = mapOf( - "e_id" to id, - "v_lang" to "en", - "type" to "get_whatwehave", - ), headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe()?.apiIframe ?: return - - delay(1000) - val iframe = app.get(iframeUrl, referer = url).document.selectFirst("iframe") - ?.attr("src").let { httpsify(it ?: return) } - - if (iframe.startsWith("https://vidmoly.to")) { - loadExtractor(iframe, "$hdMovieBoxAPI/", subtitleCallback) { video -> - callback.invoke( - ExtractorLink( - video.name, - video.name, - video.url, - video.referer, - Qualities.P1080.value, - video.type, - video.headers, - video.extractorData - ) - ) - } - } else { - val base = getBaseUrl(iframe) - val script = app.get( - httpsify(iframe), referer = "$hdMovieBoxAPI/" - ).document.selectFirst("script:containsData(var vhash =)")?.data() - ?.substringAfter("vhash, {")?.substringBefore("}, false") - - tryParseJson("{$script}").let { source -> - val disk = if (source?.videoDisk == null) { - "" - } else { - base64Encode(source.videoDisk.toString().toByteArray()) - } - val link = getBaseUrl(iframe) + source?.videoUrl?.replace( - "\\", "" - ) + "?s=${source?.videoServer}&d=$disk" - callback.invoke( - ExtractorLink( - "HDMovieBox", - "HDMovieBox", - link, - iframe, - Qualities.P1080.value, - isM3u8 = true, - ) - ) - - source?.tracks?.map { sub -> - subtitleCallback.invoke( - SubtitleFile( - sub.label ?: "", - fixUrl(sub.file ?: return@map null, base), - ) - ) - } - } - } - - - } - suspend fun invokeDreamfilm( title: String? = null, season: Int? = null, @@ -1517,14 +1431,15 @@ object SoraExtractor : SoraStream() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ) { + val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode) val req = app.get("$m4uhdAPI/search/${title.createSlug()}.html") val referer = getBaseUrl(req.url) val res = req.document - val scriptData = res.select("div.row div.item").map { + val scriptData = res.select("div.row div.item").map { ele -> Triple( - it.selectFirst("img.imagecover")?.attr("title"), - it.selectFirst("div.jtip-top div:last-child")?.text(), - it.selectFirst("a")?.attr("href") + ele.select("div.tiptitle p").text(), + ele.select("div.jtip-top div:last-child").text().filter { it.isDigit() }, + ele.selectFirst("a")?.attr("href") ) } @@ -1532,11 +1447,9 @@ object SoraExtractor : SoraStream() { scriptData.firstOrNull() } else { scriptData.find { - it.first?.contains( - "Watch Free ${title?.replace(":", "")}", true - ) == true && (it.first?.contains("$year") == true || it.second?.contains( - "$year" - ) == true) + it.first.contains( + "$title", true + ) && it.second == "$year" } } @@ -1556,7 +1469,7 @@ object SoraExtractor : SoraStream() { doc.select("div.le-server span").map { it.attr("data") } } else { val episodeData = - doc.selectFirst("div.col-lg-9.col-xl-9 p:matches((?i)S0?$season-E0?$episode$)") + doc.selectFirst("div.col-lg-9.col-xl-9 p:matches((?i)S$seasonSlug-E$episodeSlug)") ?: return val idepisode = episodeData.select("button").attr("idepisode") ?: return val requestEmbed = app.post( diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt index 0897e838..483be230 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt @@ -47,22 +47,6 @@ data class MoviesbayValues( @JsonProperty("values") val values: List>? = arrayListOf(), ) -data class HdMovieBoxTracks( - @JsonProperty("label") val label: String? = null, - @JsonProperty("file") val file: String? = null, -) - -data class HdMovieBoxSource( - @JsonProperty("videoUrl") val videoUrl: String? = null, - @JsonProperty("videoServer") val videoServer: String? = null, - @JsonProperty("videoDisk") val videoDisk: Any? = null, - @JsonProperty("tracks") val tracks: ArrayList? = arrayListOf(), -) - -data class HdMovieBoxIframe( - @JsonProperty("api_iframe") val apiIframe: String? = null, -) - data class ResponseHash( @JsonProperty("embed_url") val embed_url: String, @JsonProperty("key") val key: String? = null, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index ea77a419..c58f07ec 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -8,7 +8,6 @@ import com.hexated.SoraExtractor.invokeBollyMaza import com.hexated.SoraExtractor.invokeCryMovies import com.hexated.SoraExtractor.invokeDbgo import com.hexated.SoraExtractor.invokeFilmxy -import com.hexated.SoraExtractor.invokeHDMovieBox import com.hexated.SoraExtractor.invokeIdlix import com.hexated.SoraExtractor.invokeKimcartoon import com.hexated.SoraExtractor.invokeMovieHab @@ -91,7 +90,6 @@ open class SoraStream : TmdbProvider() { const val vidSrcAPI = "https://v2.vidsrc.me" const val dbgoAPI = "https://dbgo.fun" const val movieHabAPI = "https://moviehab.com" - const val hdMovieBoxAPI = "https://hdmoviebox.net" const val dreamfilmAPI = "https://dreamfilmsw.net" const val series9API = "https://series9.cx" const val idlixAPI = "https://tv.idlixplus.net" @@ -106,7 +104,7 @@ open class SoraStream : TmdbProvider() { const val fwatayakoAPI = "https://5100.svetacdn.in" const val gMoviesAPI = "https://gdrivemovies.xyz" const val fdMoviesAPI = "https://freedrivemovie.lol" - const val m4uhdAPI = "https://m4uhd.tv" + const val m4uhdAPI = "https://ww2.m4ufree.com" const val tvMoviesAPI = "https://www.tvseriesnmovies.com" const val moviezAddAPI = "https://ww2.moviezaddiction.click" const val bollyMazaAPI = "https://m.bollymaza.click" @@ -127,7 +125,7 @@ open class SoraStream : TmdbProvider() { const val pobmoviesAPI = "https://pobmovies.cam" const val fourCartoonAPI = "https://4cartoon.net" const val multimoviesAPI = "https://multi-movies.xyz" - const val netmoviesAPI = "https://netmovies.to" + const val netmoviesAPI = "https://web.netmovies.to" const val momentAPI = "https://moment-explanation-i-244.site" const val doomoviesAPI = "https://doomovies.net" const val primewireAPI = "https://real-primewire.club" @@ -419,15 +417,6 @@ open class SoraStream : TmdbProvider() { callback ) }, - { - if (!res.isAnime) invokeHDMovieBox( - res.title, - res.season, - res.episode, - subtitleCallback, - callback - ) - }, { if (!res.isAnime) invokeDreamfilm( res.title, @@ -541,7 +530,7 @@ open class SoraStream : TmdbProvider() { { if(!res.isAnime) invokeM4uhd( res.title, - res.year, + res.airedYear ?: res.year, 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 2703133e..abe0c861 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -11,7 +11,6 @@ import com.hexated.SoraExtractor.invokeFilmxy import com.hexated.SoraExtractor.invokeFlixon import com.hexated.SoraExtractor.invokeFwatayako import com.hexated.SoraExtractor.invokeGoku -import com.hexated.SoraExtractor.invokeHDMovieBox import com.hexated.SoraExtractor.invokeIdlix import com.hexated.SoraExtractor.invokeKimcartoon import com.hexated.SoraExtractor.invokeKisskh @@ -33,7 +32,6 @@ import com.hexated.SoraExtractor.invokeMoment import com.hexated.SoraExtractor.invokeMultimovies import com.hexated.SoraExtractor.invokeNetmovies import com.hexated.SoraExtractor.invokePrimewire -import com.hexated.SoraExtractor.invokeSusflix import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeWatchOnline @@ -127,25 +125,6 @@ class SoraStreamLite : SoraStream() { callback ) }, -// { -// if (res.season != null && res.isAnime) invokeCrunchyroll( -// res.title, -// res.epsTitle, -// res.season, -// res.episode, -// subtitleCallback, -// callback -// ) -// }, - { - if (!res.isAnime) invokeHDMovieBox( - res.title, - res.season, - res.episode, - subtitleCallback, - callback - ) - }, { if (!res.isAnime) invokeDreamfilm( res.title, @@ -259,7 +238,7 @@ class SoraStreamLite : SoraStream() { { if(!res.isAnime) invokeM4uhd( res.title, - res.year, + res.airedYear ?: res.year, res.season, res.episode, subtitleCallback,