mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix Chillx
This commit is contained in:
parent
f103fb2dd7
commit
5826ae2301
1 changed files with 8 additions and 3 deletions
|
@ -23,13 +23,14 @@ class Watchx : Chillx() {
|
||||||
override val name = "Watchx"
|
override val name = "Watchx"
|
||||||
override val mainUrl = "https://watchx.top"
|
override val mainUrl = "https://watchx.top"
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val KEY = "eN0^>\$^#M08uFv%c"
|
private const val KEY = "tSIsE8FgpRkv3QQQ"
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getUrl(
|
override suspend fun getUrl(
|
||||||
|
@ -38,10 +39,14 @@ open class Chillx : ExtractorApi() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val master = Regex("MasterJS\\s*=\\s*'([^']+)").find(
|
val master = Regex("\\s*=\\s*'([^']+)").find(
|
||||||
app.get(
|
app.get(
|
||||||
url,
|
url,
|
||||||
referer = referer
|
referer = referer ?: "",
|
||||||
|
headers = mapOf(
|
||||||
|
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||||
|
"Accept-Language" to "en-US,en;q=0.5",
|
||||||
|
)
|
||||||
).text
|
).text
|
||||||
)?.groupValues?.get(1)
|
)?.groupValues?.get(1)
|
||||||
val decrypt = cryptoAESHandler(master ?: return, KEY.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt")
|
val decrypt = cryptoAESHandler(master ?: return, KEY.toByteArray(), false)?.replace("\\", "") ?: throw ErrorLoadingException("failed to decrypt")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue