Update Chillx.kt
This commit is contained in:
parent
0ac9d6f2a1
commit
f803219c99
|
@ -41,7 +41,6 @@ open class Chillx : ExtractorApi() {
|
|||
referer = url,
|
||||
).text
|
||||
)?.groupValues?.get(1)
|
||||
val key = app.get("https://raw.githubusercontent.com/rushi-chavan/multi-keys/keys/keys.json").parsedSafe<Keys>()?.key?.get(0) ?: throw ErrorLoadingException("Unable to get key")
|
||||
val decrypt = cryptoAESHandler(master ?: "",key.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt")
|
||||
val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
||||
val subtitles = Regex("""subtitle"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
||||
|
@ -85,6 +84,13 @@ open class Chillx : ExtractorApi() {
|
|||
}
|
||||
}
|
||||
|
||||
private var key: String? = null
|
||||
val key = fetchKey() ?: 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(
|
||||
@JsonProperty("chillx") val key: List<String>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue