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
b9fd6d8a02
commit
cc2cc118d2
2 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 26
|
||||
version = 27
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -229,14 +229,17 @@ class KuramanimeProvider : MainAPI() {
|
|||
}
|
||||
|
||||
private suspend fun fetchAuth(url: String) : Pair<String?,String?> {
|
||||
val regex = Regex("""$mainUrl/(?!anime|assets|images|misc|cf-fonts)\w+""")
|
||||
val found = WebViewResolver(
|
||||
Regex("""$mainUrl/(?!anime|assets|images)\w+""")
|
||||
Regex("""dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb"""),
|
||||
additionalUrls = listOf(regex)
|
||||
).resolveUsingWebView(
|
||||
requestCreator(
|
||||
"GET", url
|
||||
)
|
||||
).first
|
||||
return found?.url.toString() to found?.headers?.get("Authorization")
|
||||
)
|
||||
val foundUrl = found.second.last()
|
||||
return foundUrl.url.toString() to foundUrl.headers["Authorization"]
|
||||
}
|
||||
|
||||
private suspend fun getAuth(url: String) = auth ?: fetchAuth(url).also { auth = it }
|
||||
|
|
Loading…
Reference in a new issue