From 76c58dbfc386d3abd52b06404f3a113634552b34 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 3 Jan 2024 07:04:36 +0700 Subject: [PATCH] fix --- .../src/main/kotlin/com/hexated/SoraUtils.kt | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 22c68cac0..dbbd51de6 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -9,7 +9,6 @@ import com.hexated.SoraStream.Companion.gdbot import com.hexated.SoraStream.Companion.hdmovies4uAPI import com.hexated.SoraStream.Companion.malsyncAPI import com.hexated.SoraStream.Companion.tvMoviesAPI -import com.hexated.SoraStream.Companion.watchflxAPI import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.APIHolder.getCaptchaToken import com.lagradost.cloudstream3.APIHolder.unixTimeMS @@ -46,7 +45,6 @@ import javax.crypto.spec.SecretKeySpec import kotlin.collections.ArrayList import kotlin.math.min -var watchflxCookies: Map? = null var filmxyCookies: Map? = null var sfServer: String? = null @@ -711,23 +709,6 @@ suspend fun fetchFilmxyCookies(url: String): Map { return cookieJar.plus(defaultCookies) } -suspend fun getWatchflxCookies() = - watchflxCookies ?: fetchWatchflxCookies().also { watchflxCookies = it } - -suspend fun fetchWatchflxCookies(): Map { - session.get(watchflxAPI) - val cookies = session.baseClient.cookieJar.loadForRequest(watchflxAPI.toHttpUrl()) - .associate { it.name to it.value } - val loginUrl = "$watchflxAPI/cookie-based-login" - session.post( - loginUrl, data = mapOf( - "continue_as_temp" to "true" - ), cookies = cookies, headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ) - return session.baseClient.cookieJar.loadForRequest(loginUrl.toHttpUrl()) - .associate { it.name to it.value } -} - fun Document.findTvMoviesIframe(): String? { return this.selectFirst("script:containsData(var seconds)")?.data()?.substringAfter("href='") ?.substringBefore("'>")