This commit is contained in:
hexated 2023-10-22 16:35:23 +07:00
parent a312faa852
commit 012217b40d
3 changed files with 52 additions and 19 deletions

View file

@ -2376,27 +2376,37 @@ object SoraExtractor : SoraStream() {
}
suspend fun invokeRidomovies(
tmdbId: Int? = null,
imdbId: String? = null,
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
)
)
val slug = app.get("$ridomoviesAPI/core/api/search?q=$title")
.parsedSafe<RidoSearch>()?.data?.items?.find {
it.contentable?.tmdbId == tmdbId || it.contentable?.imdbId == imdbId
}?.slug ?: return
app.get("$ridomoviesAPI/core/api/movies/$slug/videos")
.parsedSafe<RidoResponses>()?.data?.apmap { link ->
val iframe = Jsoup.parse(link.url ?: return@apmap).select("iframe").attr("data-src")
val unpacked =
getAndUnpack(
app.get(
iframe,
referer = "$ridomoviesAPI/"
).text
)
val video = Regex("=\"(aHR.*?)\";").find(unpacked)?.groupValues?.get(1)
callback.invoke(
ExtractorLink(
"Ridomovies",
"Ridomovies",
base64Decode(video ?: return@apmap),
"${getBaseUrl(iframe)}/",
Qualities.P1080.value,
isM3u8 = true
)
)
}
}
suspend fun invokeNavy(

View file

@ -392,4 +392,27 @@ data class SFMoviesData(
data class SFMoviesSearch(
@JsonProperty("data") var data: ArrayList<SFMoviesData>? = arrayListOf(),
)
data class RidoContentable(
@JsonProperty("imdbId") var imdbId: String? = null,
@JsonProperty("tmdbId") var tmdbId: Int? = null,
)
data class RidoItems(
@JsonProperty("slug") var slug: String? = null,
@JsonProperty("contentable") var contentable: RidoContentable? = null,
)
data class RidoData(
@JsonProperty("url") var url: String? = null,
@JsonProperty("items") var items: ArrayList<RidoItems>? = arrayListOf(),
)
data class RidoResponses(
@JsonProperty("data") var data: ArrayList<RidoData>? = arrayListOf(),
)
data class RidoSearch(
@JsonProperty("data") var data: RidoData? = null,
)

View file

@ -440,7 +440,7 @@ suspend fun invokeSmashyFfix(
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
source.split(",").map { links ->
val quality = Regex("(?i)\\[(\\d+(?:k|p)?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
val quality = Regex("\\[(\\S+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
val link = links.removePrefix("[$quality]").trim()
callback.invoke(
ExtractorLink(