mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed #338
This commit is contained in:
parent
a312faa852
commit
012217b40d
3 changed files with 52 additions and 19 deletions
|
@ -2376,27 +2376,37 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeRidomovies(
|
suspend fun invokeRidomovies(
|
||||||
|
tmdbId: Int? = null,
|
||||||
|
imdbId: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
year: Int? = null,
|
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val iframe =
|
val slug = app.get("$ridomoviesAPI/core/api/search?q=$title")
|
||||||
app.get("$ridomoviesAPI/movies/${title.createSlug()}-watch-online-$year").document.selectFirst(
|
.parsedSafe<RidoSearch>()?.data?.items?.find {
|
||||||
"div.player-div iframe"
|
it.contentable?.tmdbId == tmdbId || it.contentable?.imdbId == imdbId
|
||||||
)?.attr("data-src")
|
}?.slug ?: return
|
||||||
val unpacked = getAndUnpack(app.get(iframe ?: return, referer = "$ridomoviesAPI/").text)
|
app.get("$ridomoviesAPI/core/api/movies/$slug/videos")
|
||||||
val video = Regex("=\"(aHR.*?)\";").find(unpacked)?.groupValues?.get(1)
|
.parsedSafe<RidoResponses>()?.data?.apmap { link ->
|
||||||
callback.invoke(
|
val iframe = Jsoup.parse(link.url ?: return@apmap).select("iframe").attr("data-src")
|
||||||
ExtractorLink(
|
val unpacked =
|
||||||
"Ridomovies",
|
getAndUnpack(
|
||||||
"Ridomovies",
|
app.get(
|
||||||
base64Decode(video ?: return),
|
iframe,
|
||||||
"${getBaseUrl(iframe)}/",
|
referer = "$ridomoviesAPI/"
|
||||||
Qualities.P1080.value,
|
).text
|
||||||
isM3u8 = true
|
)
|
||||||
)
|
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(
|
suspend fun invokeNavy(
|
||||||
|
|
|
@ -393,3 +393,26 @@ data class SFMoviesData(
|
||||||
data class SFMoviesSearch(
|
data class SFMoviesSearch(
|
||||||
@JsonProperty("data") var data: ArrayList<SFMoviesData>? = arrayListOf(),
|
@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,
|
||||||
|
)
|
|
@ -440,7 +440,7 @@ suspend fun invokeSmashyFfix(
|
||||||
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
||||||
|
|
||||||
source.split(",").map { links ->
|
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()
|
val link = links.removePrefix("[$quality]").trim()
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
|
Loading…
Reference in a new issue