mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
update
This commit is contained in:
parent
d69d3c9893
commit
9f81efb652
1 changed files with 3 additions and 3 deletions
|
@ -241,7 +241,7 @@ class KuramanimeProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun fetchAuth(url: String) : AuthParams {
|
private suspend fun fetchAuth(url: String) : AuthParams {
|
||||||
val regex = Regex("""$mainUrl/(?!anime/|assets/|images/|misc/|cf-fonts/)\w+""")
|
val regex = Regex("""$mainUrl/\S+""")
|
||||||
val found = WebViewResolver(
|
val found = WebViewResolver(
|
||||||
Regex("""$url(?!\?page=)\?"""),
|
Regex("""$url(?!\?page=)\?"""),
|
||||||
additionalUrls = listOf(regex)
|
additionalUrls = listOf(regex)
|
||||||
|
@ -250,8 +250,8 @@ class KuramanimeProvider : MainAPI() {
|
||||||
"GET", url
|
"GET", url
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
val addition = found.second.last()
|
val addition = found.second.find { !it.headers["Authorization"].isNullOrBlank() }
|
||||||
return AuthParams(found.first?.url, addition.url.toString(), addition.headers["Authorization"])
|
return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers?.get("Authorization"))
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it }
|
private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it }
|
||||||
|
|
Loading…
Reference in a new issue