mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fixed HDMovieBox
This commit is contained in:
parent
c7da0fd1ab
commit
672c540608
4 changed files with 76 additions and 58 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 107
|
version = 108
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -255,9 +255,8 @@ object SoraExtractor : SoraStream() {
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val fixTitle = title.createSlug()
|
val fixTitle = title.createSlug()
|
||||||
val request = app.get("$hdMovieBoxAPI/watch/$fixTitle")
|
val url = "$hdMovieBoxAPI/watch/$fixTitle"
|
||||||
if (!request.isSuccessful) return
|
val doc = app.get(url).document
|
||||||
val doc = request.document
|
|
||||||
val id = if (season == null) {
|
val id = if (season == null) {
|
||||||
doc.selectFirst("div.player div#not-loaded")?.attr("data-whatwehave")
|
doc.selectFirst("div.player div#not-loaded")?.attr("data-whatwehave")
|
||||||
} else {
|
} else {
|
||||||
|
@ -274,12 +273,29 @@ object SoraExtractor : SoraStream() {
|
||||||
), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||||
).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return
|
).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return
|
||||||
|
|
||||||
val iframe = app.get(iframeUrl, referer = "$hdMovieBoxAPI/").document.selectFirst("iframe")
|
delay(1000)
|
||||||
?.attr("src")
|
val iframe = app.get(iframeUrl, referer = url).document.selectFirst("iframe")
|
||||||
val base = getBaseUrl(iframe ?: return)
|
?.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.isM3u8,
|
||||||
|
video.headers,
|
||||||
|
video.extractorData
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
val base = getBaseUrl(iframe)
|
||||||
val script = app.get(
|
val script = app.get(
|
||||||
iframe, referer = "$hdMovieBoxAPI/"
|
httpsify(iframe), referer = "$hdMovieBoxAPI/"
|
||||||
).document.selectFirst("script:containsData(var vhash =)")?.data()
|
).document.selectFirst("script:containsData(var vhash =)")?.data()
|
||||||
?.substringAfter("vhash, {")?.substringBefore("}, false")
|
?.substringAfter("vhash, {")?.substringBefore("}, false")
|
||||||
|
|
||||||
|
@ -314,6 +330,9 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
suspend fun invokeSeries9(
|
suspend fun invokeSeries9(
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
@ -639,7 +658,6 @@ object SoraExtractor : SoraStream() {
|
||||||
if (iframe.isNotEmpty()) {
|
if (iframe.isNotEmpty()) {
|
||||||
loadExtractor(iframe, "$kimcartoonAPI/", subtitleCallback, callback)
|
loadExtractor(iframe, "$kimcartoonAPI/", subtitleCallback, callback)
|
||||||
}
|
}
|
||||||
//There are other servers, but they require some work to do
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -450,16 +450,16 @@ open class SoraStream : TmdbProvider() {
|
||||||
{
|
{
|
||||||
invokeNoverse(res.title, res.season, res.episode, callback)
|
invokeNoverse(res.title, res.season, res.episode, callback)
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
invokeUniqueStream(
|
// invokeUniqueStream(
|
||||||
res.title,
|
// res.title,
|
||||||
res.year,
|
// res.year,
|
||||||
res.season,
|
// res.season,
|
||||||
res.episode,
|
// res.episode,
|
||||||
subtitleCallback,
|
// subtitleCallback,
|
||||||
callback
|
// callback
|
||||||
)
|
// )
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
|
|
|
@ -138,16 +138,16 @@ class SoraStreamLite : SoraStream() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
invokeUniqueStream(
|
// invokeUniqueStream(
|
||||||
res.title,
|
// res.title,
|
||||||
res.year,
|
// res.year,
|
||||||
res.season,
|
// res.season,
|
||||||
res.episode,
|
// res.episode,
|
||||||
subtitleCallback,
|
// subtitleCallback,
|
||||||
callback
|
// callback
|
||||||
)
|
// )
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue