Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjohn committed Nov 30, 2023
1 parent b9fd6d8 commit cc2cc11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion KuramanimeProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 26
version = 27


cloudstream {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit cc2cc11

Please sign in to comment.