fix again

This commit is contained in:
jack 2023-11-01 11:31:17 +07:00
parent c7ca6d2e3d
commit 882d178036
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 20 version = 21
cloudstream { cloudstream {

View file

@ -196,6 +196,7 @@ class KuramanimeProvider : MainAPI() {
val req = app.get(data) val req = app.get(data)
val res = req.document val res = req.document
val token = res.select("meta[name=csrf-token]").attr("content") val token = res.select("meta[name=csrf-token]").attr("content")
val st = res.select("input#kuramaRoute").attr("value")
headers = mapOf( headers = mapOf(
"X-Requested-With" to "XMLHttpRequest", "X-Requested-With" to "XMLHttpRequest",
"X-CSRF-TOKEN" to token "X-CSRF-TOKEN" to token
@ -203,7 +204,7 @@ class KuramanimeProvider : MainAPI() {
cookies = req.cookies cookies = req.cookies
res.select("select#changeServer option").apmap { source -> res.select("select#changeServer option").apmap { source ->
val server = source.attr("value") val server = source.attr("value")
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=o9x0eEcLo6lwZAK9jjuuTCRILJTQdc2C&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server" val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=$st&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
if (server.contains(Regex("(?i)kuramadrive|archive"))) { if (server.contains(Regex("(?i)kuramadrive|archive"))) {
invokeLocalSource(link, server, data, callback) invokeLocalSource(link, server, data, callback)
} else { } else {