This commit is contained in:
alex 2024-01-11 18:49:11 +07:00
parent 852796cc15
commit b77d6ead50
5 changed files with 163 additions and 35 deletions

View file

@ -342,6 +342,96 @@ open class Netembed : ExtractorApi() {
} }
} }
open class Ridoo : ExtractorApi() {
override val name = "Ridoo"
override var mainUrl = "https://ridoo.net"
override val requiresReferer = true
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val response = app.get(url, referer = referer)
val script = if (!getPacked(response.text).isNullOrEmpty()) {
getAndUnpack(response.text)
} else {
response.document.selectFirst("script:containsData(sources:)")?.data()
}
val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
callback.invoke(
ExtractorLink(
this.name,
this.name,
m3u8 ?: return,
mainUrl,
Qualities.P1080.value,
INFER_TYPE
)
)
}
}
open class Streamvid : ExtractorApi() {
override val name = "Streamvid"
override val mainUrl = "https://streamvid.net"
override val requiresReferer = true
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val response = app.get(url, referer = referer)
val script = if (!getPacked(response.text).isNullOrEmpty()) {
getAndUnpack(response.text)
} else {
response.document.selectFirst("script:containsData(sources:)")?.data()
}
val m3u8 =
Regex("src:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
M3u8Helper.generateM3u8(
name,
m3u8 ?: return,
mainUrl
).forEach(callback)
}
}
open class Embedrise : ExtractorApi() {
override val name = "Embedrise"
override val mainUrl = "https://embedrise.com"
override val requiresReferer = true
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val res = app.get(url, referer = referer).document
val title = res.select("title").text()
val video = res.select("video#player source").attr("src")
callback.invoke(
ExtractorLink(
this.name,
this.name,
video,
"$mainUrl/",
getIndexQuality(title),
INFER_TYPE
)
)
}
}
class Streamwish : Filesim() { class Streamwish : Filesim() {
override val name = "Streamwish" override val name = "Streamwish"
override var mainUrl = "https://streamwish.to" override var mainUrl = "https://streamwish.to"

View file

@ -476,7 +476,11 @@ object SoraExtractor : SoraStream() {
document.select("ul#playeroptionsul > li") document.select("ul#playeroptionsul > li")
.filter { element -> element.select("span.flag img").attr("src").contains("/en.") } .filter { element -> element.select("span.flag img").attr("src").contains("/en.") }
.map { .map {
Triple(it.attr("data-post"), it.attr("data-nume"), it.attr("data-type")) Triple(
it.attr("data-post"),
it.attr("data-nume"),
it.attr("data-type")
)
}.apmap { (id, nume, type) -> }.apmap { (id, nume, type) ->
val source = app.get( val source = app.get(
"$host/wp-json/dooplayer/v2/${id}/${type}/${nume}", "$host/wp-json/dooplayer/v2/${id}/${type}/${nume}",
@ -484,10 +488,23 @@ object SoraExtractor : SoraStream() {
referer = "$host/" referer = "$host/"
).parsed<ResponseHash>().embed_url ).parsed<ResponseHash>().embed_url
if (!source.contains("youtube")) { if (!source.contains("youtube")) {
if (source.startsWith("https://voe.sx")) {
val req = app.get(source, referer = "$host/")
val server = getBaseUrl(req.url)
val script = req.text.substringAfter("wc0 = '").substringBefore("'")
val video = tryParseJson<Map<String, String>>(base64Decode(script))?.get("file")
M3u8Helper.generateM3u8(
"Voe",
video ?: return@apmap,
"$server/",
headers = mapOf("Origin" to server)
).forEach(callback)
} else {
loadExtractor(source, "$host/", subtitleCallback, callback) loadExtractor(source, "$host/", subtitleCallback, callback)
} }
} }
} }
}
suspend fun invokeNoverse( suspend fun invokeNoverse(
title: String? = null, title: String? = null,
@ -2339,25 +2356,51 @@ object SoraExtractor : SoraStream() {
suspend fun invokeRidomovies( suspend fun invokeRidomovies(
tmdbId: Int? = null, tmdbId: Int? = null,
imdbId: String? = null, imdbId: String? = null,
title: String? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit, callback: (ExtractorLink) -> Unit,
) { ) {
val slug = app.get("$ridomoviesAPI/core/api/search?q=$imdbId") val slug = if (season == null) {
app.get("$ridomoviesAPI/core/api/search?q=$imdbId")
.parsedSafe<RidoSearch>()?.data?.items?.find { .parsedSafe<RidoSearch>()?.data?.items?.find {
it.contentable?.tmdbId == tmdbId || it.contentable?.imdbId == imdbId it.contentable?.tmdbId == tmdbId || it.contentable?.imdbId == imdbId
}?.slug ?: return }?.slug
app.get("$ridomoviesAPI/core/api/movies/$slug/videos") } else {
.parsedSafe<RidoResponses>()?.data?.apmap { link -> app.get("$ridomoviesAPI/tv/${title.createSlug()}/season-$season/episode-$episode").text.substringAfterLast(
"""postid\":\""""
).substringBefore("""\"""")
} ?: return
val url = if(season == null) {
"$ridomoviesAPI/core/api/movies/$slug/videos"
} else {
"$ridomoviesAPI/core/api/episodes/$slug/videos"
}
app.get(url).parsedSafe<RidoResponses>()?.data?.apmap { link ->
val iframe = Jsoup.parse(link.url ?: return@apmap).select("iframe").attr("data-src") val iframe = Jsoup.parse(link.url ?: return@apmap).select("iframe").attr("data-src")
val unpacked = getAndUnpack(app.get(iframe, referer = "$ridomoviesAPI/").text) if(iframe.startsWith("https://closeload.top")) {
val unpacked =
getAndUnpack(
app.get(
iframe,
referer = "$ridomoviesAPI/"
).text
)
val video = Regex("=\"(aHR.*?)\";").find(unpacked)?.groupValues?.get(1) val video = Regex("=\"(aHR.*?)\";").find(unpacked)?.groupValues?.get(1)
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"Ridomovies", "Ridomovies", base64Decode( "Ridomovies",
video "Ridomovies",
?: return@apmap base64Decode(video ?: return@apmap),
), "${getBaseUrl(iframe)}/", Qualities.P1080.value, isM3u8 = true "${getBaseUrl(iframe)}/",
Qualities.P1080.value,
isM3u8 = true
) )
) )
} else {
loadExtractor(iframe, "$ridomoviesAPI/", subtitleCallback, callback)
}
} }
} }

View file

@ -104,7 +104,7 @@ open class SoraStream : TmdbProvider() {
const val nowTvAPI = "https://myfilestorage.xyz" const val nowTvAPI = "https://myfilestorage.xyz"
const val gokuAPI = "https://goku.sx" const val gokuAPI = "https://goku.sx"
const val zshowAPI = BuildConfig.ZSHOW_API const val zshowAPI = BuildConfig.ZSHOW_API
const val ridomoviesAPI = "https://ridomovies.pw" const val ridomoviesAPI = "https://ridomovies.tv"
const val emoviesAPI = "https://emovies.si" const val emoviesAPI = "https://emovies.si"
const val multimoviesAPI = "https://multimovies.top" const val multimoviesAPI = "https://multimovies.top"
const val multimovies2API = "https://multimovies.click" const val multimovies2API = "https://multimovies.click"
@ -584,11 +584,7 @@ open class SoraStream : TmdbProvider() {
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback) if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
}, },
{ {
if (!res.isAnime && res.season == null) invokeRidomovies( if (!res.isAnime && res.season == null) invokeRidomovies(res.id, res.imdbId, res.title, res.season, res.episode, subtitleCallback, callback)
res.id,
res.imdbId,
callback
)
}, },
{ {
if (!res.isAnime) invokeAllMovieland(res.imdbId, res.season, res.episode, callback) if (!res.isAnime) invokeAllMovieland(res.imdbId, res.season, res.episode, callback)

View file

@ -223,11 +223,7 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
if (!res.isAnime && res.season == null) invokeRidomovies( if (!res.isAnime && res.season == null) invokeRidomovies(res.id, res.imdbId, res.title, res.season, res.episode, subtitleCallback, callback)
res.id,
res.imdbId,
callback
)
}, },
{ {
if (!res.isAnime) invokeEmovies( if (!res.isAnime) invokeEmovies(

View file

@ -30,5 +30,8 @@ class SoraStreamPlugin: Plugin() {
registerExtractorAPI(Netembed()) registerExtractorAPI(Netembed())
registerExtractorAPI(Flaswish()) registerExtractorAPI(Flaswish())
registerExtractorAPI(Comedyshow()) registerExtractorAPI(Comedyshow())
registerExtractorAPI(Ridoo())
registerExtractorAPI(Streamvid())
registerExtractorAPI(Embedrise())
} }
} }