diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 80f6fd73..83100db8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -230,7 +230,7 @@ dependencies { // Downloading & Networking implementation("androidx.work:work-runtime:2.9.0") implementation("androidx.work:work-runtime-ktx:2.9.0") - implementation("com.github.Blatzar:NiceHttp:0.4.5") // HTTP Lib + implementation("com.github.Blatzar:NiceHttp:0.4.11") // HTTP Lib } tasks.register("androidSourcesJar", Jar::class) { diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/Vidplay.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/Vidplay.kt index b9a07a6d..ae09425c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/extractors/Vidplay.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/Vidplay.kt @@ -1,17 +1,19 @@ package com.lagradost.cloudstream3.extractors import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.cloudstream3.ErrorLoadingException import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Encode +import com.lagradost.cloudstream3.utils.AppUtils import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import javax.crypto.Cipher import javax.crypto.spec.SecretKeySpec -// Code found in https://github.com/KillerDogeEmpire/vidplay-keys -// special credits to @KillerDogeEmpire for providing key +// Code found in https://github.com/Ciarands/vidsrc-keys +// special credits to @Ciarands for providing key class MyCloud : Vidplay() { override val name = "MyCloud" @@ -26,8 +28,7 @@ open class Vidplay : ExtractorApi() { override val name = "Vidplay" override val mainUrl = "https://vidplay.site" override val requiresReferer = true - open val key = - "https://raw.githubusercontent.com/KillerDogeEmpire/vidplay-keys/keys/keys.json" + open val key = "https://github.com/Ciarands/vidsrc-keys/blob/main/keys.json" // using raw.githubusercontent.com will make the keys out of sync override suspend fun getUrl( url: String, @@ -62,7 +63,9 @@ open class Vidplay : ExtractorApi() { } private suspend fun getKeys(): List { - return app.get(key).parsed() + val res = app.get(key).text + val keys = """"rawLines":\s*\["(.+)"]""".toRegex().find(res)?.groupValues?.get(1)?.replace(Regex("""\\""""), "\"") + return AppUtils.tryParseJson>(keys) ?: throw ErrorLoadingException("No keys found") } private suspend fun callFutoken(id: String, url: String): String? {