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
|
||||
version = 107
|
||||
version = 108
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -255,9 +255,8 @@ object SoraExtractor : SoraStream() {
|
|||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val fixTitle = title.createSlug()
|
||||
val request = app.get("$hdMovieBoxAPI/watch/$fixTitle")
|
||||
if (!request.isSuccessful) return
|
||||
val doc = request.document
|
||||
val url = "$hdMovieBoxAPI/watch/$fixTitle"
|
||||
val doc = app.get(url).document
|
||||
val id = if (season == null) {
|
||||
doc.selectFirst("div.player div#not-loaded")?.attr("data-whatwehave")
|
||||
} else {
|
||||
|
@ -274,12 +273,29 @@ object SoraExtractor : SoraStream() {
|
|||
), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||
).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return
|
||||
|
||||
val iframe = app.get(iframeUrl, referer = "$hdMovieBoxAPI/").document.selectFirst("iframe")
|
||||
?.attr("src")
|
||||
val base = getBaseUrl(iframe ?: return)
|
||||
delay(1000)
|
||||
val iframe = app.get(iframeUrl, referer = url).document.selectFirst("iframe")
|
||||
?.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(
|
||||
iframe, referer = "$hdMovieBoxAPI/"
|
||||
httpsify(iframe), referer = "$hdMovieBoxAPI/"
|
||||
).document.selectFirst("script:containsData(var vhash =)")?.data()
|
||||
?.substringAfter("vhash, {")?.substringBefore("}, false")
|
||||
|
||||
|
@ -314,6 +330,9 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
suspend fun invokeSeries9(
|
||||
title: String? = null,
|
||||
season: Int? = null,
|
||||
|
@ -639,7 +658,6 @@ object SoraExtractor : SoraStream() {
|
|||
if (iframe.isNotEmpty()) {
|
||||
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)
|
||||
},
|
||||
{
|
||||
invokeUniqueStream(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// invokeUniqueStream(
|
||||
// res.title,
|
||||
// res.year,
|
||||
// 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
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeUniqueStream(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// invokeUniqueStream(
|
||||
// res.title,
|
||||
// res.year,
|
||||
// res.season,
|
||||
// res.episode,
|
||||
// subtitleCallback,
|
||||
// callback
|
||||
// )
|
||||
// },
|
||||
{
|
||||
if (!res.isAnime) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue