mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix
This commit is contained in:
parent
29c78d2468
commit
76c58dbfc3
1 changed files with 0 additions and 19 deletions
|
@ -9,7 +9,6 @@ import com.hexated.SoraStream.Companion.gdbot
|
||||||
import com.hexated.SoraStream.Companion.hdmovies4uAPI
|
import com.hexated.SoraStream.Companion.hdmovies4uAPI
|
||||||
import com.hexated.SoraStream.Companion.malsyncAPI
|
import com.hexated.SoraStream.Companion.malsyncAPI
|
||||||
import com.hexated.SoraStream.Companion.tvMoviesAPI
|
import com.hexated.SoraStream.Companion.tvMoviesAPI
|
||||||
import com.hexated.SoraStream.Companion.watchflxAPI
|
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.APIHolder.getCaptchaToken
|
import com.lagradost.cloudstream3.APIHolder.getCaptchaToken
|
||||||
import com.lagradost.cloudstream3.APIHolder.unixTimeMS
|
import com.lagradost.cloudstream3.APIHolder.unixTimeMS
|
||||||
|
@ -46,7 +45,6 @@ import javax.crypto.spec.SecretKeySpec
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
var watchflxCookies: Map<String, String>? = null
|
|
||||||
var filmxyCookies: Map<String, String>? = null
|
var filmxyCookies: Map<String, String>? = null
|
||||||
var sfServer: String? = null
|
var sfServer: String? = null
|
||||||
|
|
||||||
|
@ -711,23 +709,6 @@ suspend fun fetchFilmxyCookies(url: String): Map<String, String> {
|
||||||
return cookieJar.plus(defaultCookies)
|
return cookieJar.plus(defaultCookies)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getWatchflxCookies() =
|
|
||||||
watchflxCookies ?: fetchWatchflxCookies().also { watchflxCookies = it }
|
|
||||||
|
|
||||||
suspend fun fetchWatchflxCookies(): Map<String, String> {
|
|
||||||
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? {
|
fun Document.findTvMoviesIframe(): String? {
|
||||||
return this.selectFirst("script:containsData(var seconds)")?.data()?.substringAfter("href='")
|
return this.selectFirst("script:containsData(var seconds)")?.data()?.substringAfter("href='")
|
||||||
?.substringBefore("'>")
|
?.substringBefore("'>")
|
||||||
|
|
Loading…
Reference in a new issue