sora: fix few sources

This commit is contained in:
hexated 2023-06-22 17:05:28 +07:00
parent 048d44f980
commit 13c9debd62
4 changed files with 44 additions and 7 deletions

View file

@ -2969,6 +2969,30 @@ object SoraExtractor : SoraStream() {
)
}
suspend fun invokeRidomovies(
title: String? = null,
year: Int? = null,
callback: (ExtractorLink) -> Unit,
) {
val iframe =
app.get("$ridomoviesAPI/movies/${title.createSlug()}-watch-online-$year").document.selectFirst(
"div.player-div iframe"
)?.attr("data-src")
val unpacked = getAndUnpack(app.get(iframe ?: return, referer = "$ridomoviesAPI/").text)
val video = Regex("=\"(aHR.*?)\";").find(unpacked)?.groupValues?.get(1)
callback.invoke(
ExtractorLink(
"Ridomovies",
"Ridomovies",
base64Decode(video ?: return),
"${getBaseUrl(iframe)}/",
Qualities.P1080.value,
isM3u8 = true
)
)
}
}

View file

@ -42,6 +42,7 @@ import com.hexated.SoraExtractor.invokeNinetv
import com.hexated.SoraExtractor.invokeNowTv
import com.hexated.SoraExtractor.invokePutlocker
import com.hexated.SoraExtractor.invokeRStream
import com.hexated.SoraExtractor.invokeRidomovies
import com.hexated.SoraExtractor.invokeRinzrymovies
import com.hexated.SoraExtractor.invokeRubyMovies
import com.hexated.SoraExtractor.invokeShinobiMovies
@ -124,6 +125,7 @@ open class SoraStream : TmdbProvider() {
const val fmoviesAPI = "https://fmovies.to"
const val nowTvAPI = "https://myfilestorage.xyz"
const val gokuAPI = "https://goku.sx"
const val ridomoviesAPI = "https://ridomovies.pw"
// INDEX SITE
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
@ -793,6 +795,9 @@ open class SoraStream : TmdbProvider() {
},
{
if (!res.isAnime && res.season == null) invokeNowTv(res.id, res.season, res.episode, callback)
},
{
if (res.season == null) invokeRidomovies(res.title, res.year, callback)
}
)

View file

@ -22,6 +22,7 @@ import com.hexated.SoraExtractor.invokeNinetv
import com.hexated.SoraExtractor.invokeNowTv
import com.hexated.SoraExtractor.invokePutlocker
import com.hexated.SoraExtractor.invokeRStream
import com.hexated.SoraExtractor.invokeRidomovies
import com.hexated.SoraExtractor.invokeSeries9
import com.hexated.SoraExtractor.invokeSmashyStream
import com.hexated.SoraExtractor.invokeSoraStream
@ -275,6 +276,13 @@ class SoraStreamLite : SoraStream() {
},
{
if (!res.isAnime && res.season == null) invokeNowTv(res.id, res.season, res.episode, callback)
},
{
if (res.season == null) invokeRidomovies(
res.title,
res.year,
callback
)
}
)

View file

@ -441,7 +441,7 @@ suspend fun invokeSmashyFfix(
?: return
val source =
Regex("file:\\s['\"](\\S+?)['|\"]").find(script)?.groupValues?.get(
Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(
1
) ?: return
@ -525,8 +525,8 @@ suspend fun invokeSmashyNflim(
val script =
app.get(url).document.selectFirst("script:containsData(player =)")?.data() ?: return
val sources = Regex("file:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
val subtitles = Regex("subtitle:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
val sources = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
val subtitles = Regex("['\"]?subtitle['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return
sources.split(",").map { links ->
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
@ -544,12 +544,12 @@ suspend fun invokeSmashyNflim(
}
subtitles.split(",").map { sub ->
val lang = Regex("\\[(.*?)]").find(sub)?.groupValues?.getOrNull(1)?.trim()
val trimmedSubLink = sub.removePrefix("[$lang]").trim()
val lang = Regex("\\[(.*?)]").find(sub)?.groupValues?.getOrNull(1)?.trim() ?: return@map
val trimmedSubLink = sub.removePrefix("[$lang]").trim().substringAfter("?url=")
if(lang.contains("\\u")) return@map
subtitleCallback.invoke(
SubtitleFile(
lang ?: return@map,
lang,
trimmedSubLink
)
)