diff --git a/lib/chillx-extractor/src/main/java/eu/kanade/tachiyomi/lib/chillxextractor/ChillxExtractor.kt b/lib/chillx-extractor/src/main/java/eu/kanade/tachiyomi/lib/chillxextractor/ChillxExtractor.kt index 21441804..daa73bff 100644 --- a/lib/chillx-extractor/src/main/java/eu/kanade/tachiyomi/lib/chillxextractor/ChillxExtractor.kt +++ b/lib/chillx-extractor/src/main/java/eu/kanade/tachiyomi/lib/chillxextractor/ChillxExtractor.kt @@ -12,24 +12,19 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import okhttp3.Headers import okhttp3.OkHttpClient -import org.jsoup.Jsoup import uy.kohesive.injekt.injectLazy class ChillxExtractor(private val client: OkHttpClient, private val headers: Headers) { private val json: Json by injectLazy() - private val playlistUtils by lazy { PlaylistUtils(client, headers) } companion object { - private val REGEX_MASTER_JS by lazy { Regex("""JScript[\w+]?\s*=\s*'([^']+)""") } - private val REGEX_EVAL_KEY by lazy { Regex("""eval\(\S+\("(\S+)",\d+,"(\S+)",(\d+),(\d+),""") } + private val REGEX_MASTER_JS by lazy { Regex("""\s*=\s*'([^']+)""") } private val REGEX_SOURCES by lazy { Regex("""sources:\s*\[\{"file":"([^"]+)""") } private val REGEX_FILE by lazy { Regex("""file: ?"([^"]+)"""") } private val REGEX_SOURCE by lazy { Regex("""source = ?"([^"]+)"""") } - - // matches "[language]https://...," - private val REGEX_SUBS by lazy { Regex("""\[(.*?)\](.*?)"?\,""") } - private const val KEY_SOURCE = "https://rowdy-avocado.github.io/multi-keys/" + private val REGEX_SUBS by lazy { Regex("""\[(.*?)\](https?://[^\s,]+)""") } + private const val KEY_SOURCE = "https://raw.githubusercontent.com/Rowdy-Avocado/multi-keys/keys/index.html" } fun videoFromUrl(url: String, referer: String, prefix: String = "Chillx - "): List