mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
small fix
This commit is contained in:
parent
d7c2ecbebd
commit
2b6a6a3879
2 changed files with 47 additions and 0 deletions
|
@ -311,6 +311,50 @@ object NineTv {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open class Streamruby : ExtractorApi() {
|
||||||
|
override val name = "Streamruby"
|
||||||
|
override val mainUrl = "https://streamruby.com"
|
||||||
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
val id = "/e/(\\w+)".toRegex().find(url)?.groupValues?.get(1) ?: return
|
||||||
|
val response = app.post("$mainUrl/dl", data = mapOf(
|
||||||
|
"op" to "embed",
|
||||||
|
"file_code" to id,
|
||||||
|
"auto" to "1",
|
||||||
|
"referer" to "",
|
||||||
|
), 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)
|
||||||
|
M3u8Helper.generateM3u8(
|
||||||
|
name,
|
||||||
|
m3u8 ?: return,
|
||||||
|
mainUrl
|
||||||
|
).forEach(callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class Streamwish : Filesim() {
|
||||||
|
override val name = "Streamwish"
|
||||||
|
override var mainUrl = "https://streamwish.to"
|
||||||
|
}
|
||||||
|
|
||||||
|
class FilelionsTo : Filesim() {
|
||||||
|
override val name = "Filelions"
|
||||||
|
override var mainUrl = "https://filelions.to"
|
||||||
|
}
|
||||||
|
|
||||||
class Hubcloud : VCloud() {
|
class Hubcloud : VCloud() {
|
||||||
override val name = "Hubcloud"
|
override val name = "Hubcloud"
|
||||||
override val mainUrl = "https://hubcloud.in"
|
override val mainUrl = "https://hubcloud.in"
|
||||||
|
|
|
@ -22,5 +22,8 @@ class SoraStreamPlugin: Plugin() {
|
||||||
registerExtractorAPI(Pixeldra())
|
registerExtractorAPI(Pixeldra())
|
||||||
registerExtractorAPI(Hubcloud())
|
registerExtractorAPI(Hubcloud())
|
||||||
registerExtractorAPI(M4ufree())
|
registerExtractorAPI(M4ufree())
|
||||||
|
registerExtractorAPI(Streamruby())
|
||||||
|
registerExtractorAPI(Streamwish())
|
||||||
|
registerExtractorAPI(FilelionsTo())
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue