small fix

This commit is contained in:
hexated 2023-10-08 08:37:12 +07:00
parent d7c2ecbebd
commit 2b6a6a3879
2 changed files with 47 additions and 0 deletions

View file

@ -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() {
override val name = "Hubcloud"
override val mainUrl = "https://hubcloud.in"

View file

@ -22,5 +22,8 @@ class SoraStreamPlugin: Plugin() {
registerExtractorAPI(Pixeldra())
registerExtractorAPI(Hubcloud())
registerExtractorAPI(M4ufree())
registerExtractorAPI(Streamruby())
registerExtractorAPI(Streamwish())
registerExtractorAPI(FilelionsTo())
}
}