mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed kuramanime
This commit is contained in:
parent
063fdb6bcf
commit
773496a3a4
3 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 19
|
||||
version = 20
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -196,7 +196,6 @@ class KuramanimeProvider : MainAPI() {
|
|||
val req = app.get(data)
|
||||
val res = req.document
|
||||
val token = res.select("meta[name=csrf-token]").attr("content")
|
||||
val stBt = res.selectFirst("script:containsData(stBk)")?.data()?.substringAfter("stBk = \"")?.substringBefore("\"")?.substringAfterLast("/") ?: return false
|
||||
headers = mapOf(
|
||||
"X-Requested-With" to "XMLHttpRequest",
|
||||
"X-CSRF-TOKEN" to token
|
||||
|
@ -204,7 +203,7 @@ class KuramanimeProvider : MainAPI() {
|
|||
cookies = req.cookies
|
||||
res.select("select#changeServer option").apmap { source ->
|
||||
val server = source.attr("value")
|
||||
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=$stBt&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
|
||||
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getSt()}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
|
||||
if (server.contains(Regex("(?i)kuramadrive|archive"))) {
|
||||
invokeLocalSource(link, server, data, callback)
|
||||
} else {
|
||||
|
@ -222,4 +221,14 @@ class KuramanimeProvider : MainAPI() {
|
|||
return true
|
||||
}
|
||||
|
||||
private fun getSt(): String {
|
||||
return arrayOf(
|
||||
"mc7cY3F6QP41u6WXAf1LinSsjlpKpoO3",
|
||||
"nLyoAr8klM7HPLsICFzN4s9lLZ3Wjk6S",
|
||||
"Z20JAgnjciWqLa4SMnADIQhqx7kQZIpo",
|
||||
"3OoTHpJOwLKftM3htx647pIEfQdwndDg",
|
||||
"dFLaNEioDslaveEVSfRHim2mogIAriuV"
|
||||
).random()
|
||||
}
|
||||
|
||||
}
|
|
@ -2129,7 +2129,7 @@ object SoraExtractor : SoraStream() {
|
|||
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
||||
}
|
||||
|
||||
val data = session.get(url, timeout = 120L, referer = ref).body.bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||
val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 1024).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||
val json = tryParseJson<BlackvidResponses>(data)
|
||||
|
||||
json?.sources?.map { source ->
|
||||
|
|
Loading…
Reference in a new issue