mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update Chillx.kt
This commit is contained in:
parent
cffd47fc1f
commit
b7459553b2
1 changed files with 3 additions and 11 deletions
|
@ -2,9 +2,7 @@ package com.lagradost.cloudstream3.extractors
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.extractors.helper.*
|
|
||||||
import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler
|
import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
|
@ -29,6 +27,7 @@ class AnimesagaStream : Chillx() {
|
||||||
override val name = "AnimesagaStream"
|
override val name = "AnimesagaStream"
|
||||||
override val mainUrl = "https://stream.anplay.in"
|
override val mainUrl = "https://stream.anplay.in"
|
||||||
}
|
}
|
||||||
|
@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"
|
||||||
|
@ -43,14 +42,14 @@ open class Chillx : ExtractorApi() {
|
||||||
val master = Regex("""JScript[\w+]?\s*=\s*'([^']+)""").find(
|
val master = Regex("""JScript[\w+]?\s*=\s*'([^']+)""").find(
|
||||||
app.get(
|
app.get(
|
||||||
url,
|
url,
|
||||||
referer = url ?: "",
|
referer = url,
|
||||||
).text
|
).text
|
||||||
)?.groupValues?.get(1)
|
)?.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 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 decrypt = cryptoAESHandler(master ?: "",key.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()
|
||||||
val matches = subtitlePattern.findAll(subtitles ?: "")
|
val matches = subtitlePattern.findAll(subtitles ?: "")
|
||||||
val languageUrlPairs = matches.map { matchResult ->
|
val languageUrlPairs = matches.map { matchResult ->
|
||||||
val (language, url) = matchResult.destructured
|
val (language, url) = matchResult.destructured
|
||||||
|
@ -90,13 +89,6 @@ open class Chillx : ExtractorApi() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
data class Tracks(
|
|
||||||
@JsonProperty("file") val file: String? = null,
|
|
||||||
@JsonProperty("label") val label: String? = null,
|
|
||||||
@JsonProperty("kind") val kind: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class Keys(
|
data class Keys(
|
||||||
@JsonProperty("chillx") val key: List<String>
|
@JsonProperty("chillx") val key: List<String>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue