mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update
This commit is contained in:
parent
f803219c99
commit
e2411e029f
1 changed files with 4 additions and 8 deletions
|
@ -22,13 +22,12 @@ class Watchx : Chillx() {
|
||||||
override val mainUrl = "https://watchx.top"
|
override val mainUrl = "https://watchx.top"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Suppress("NAME_SHADOWING")
|
|
||||||
open class Chillx : ExtractorApi() {
|
open class Chillx : ExtractorApi() {
|
||||||
override val name = "Chillx"
|
override val name = "Chillx"
|
||||||
override val mainUrl = "https://chillx.top"
|
override val mainUrl = "https://chillx.top"
|
||||||
override val requiresReferer = true
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
@Suppress("NAME_SHADOWING")
|
||||||
override suspend fun getUrl(
|
override suspend fun getUrl(
|
||||||
url: String,
|
url: String,
|
||||||
referer: String?,
|
referer: String?,
|
||||||
|
@ -41,7 +40,7 @@ open class Chillx : ExtractorApi() {
|
||||||
referer = url,
|
referer = url,
|
||||||
).text
|
).text
|
||||||
)?.groupValues?.get(1)
|
)?.groupValues?.get(1)
|
||||||
val decrypt = cryptoAESHandler(master ?: "",key.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt")
|
val decrypt = cryptoAESHandler(master ?: "",fetchKey().toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt")
|
||||||
val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
||||||
val subtitles = Regex("""subtitle"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
val subtitles = Regex("""subtitle"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
||||||
val subtitlePattern = """\[(.*?)](https?://[^\s,]+)""".toRegex()
|
val subtitlePattern = """\[(.*?)](https?://[^\s,]+)""".toRegex()
|
||||||
|
@ -84,11 +83,8 @@ open class Chillx : ExtractorApi() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var key: String? = null
|
private suspend fun fetchKey(): String {
|
||||||
val key = fetchKey() ?: throw ErrorLoadingException("Unable to get key")
|
return app.get("https://raw.githubusercontent.com/rushi-chavan/multi-keys/keys/keys.json").parsedSafe<Keys>()?.key?.get(0) ?: throw ErrorLoadingException("Unable to get key")
|
||||||
|
|
||||||
private suspend fun fetchKey(): String? {
|
|
||||||
return app.get("https://raw.githubusercontent.com/rushi-chavan/multi-keys/keys/keys.json").parsedSafe()?.key?.get(0)?.also { key = it }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data class Keys(
|
data class Keys(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue