Skip to content

Commit

Permalink
fix(id/kuramanime): Fix video list again (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudemirovsky authored Nov 26, 2023
1 parent 39e78c1 commit d135948
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/id/kuramanime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
extName = 'Kuramanime'
pkgNameSuffix = 'id.kuramanime'
extClass = '.Kuramanime'
extVersionCode = 9
extVersionCode = 10
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,15 @@ class Kuramanime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}
}

private val scriptToken by lazy {
client.newCall(GET("$baseUrl/assets/js/arc-signal.min.js")).execute()
.use { it.body.string() }
.substringAfter("kuramanime:\"+\"")
.substringBefore('"')
}

private fun getRequestHash(headers: Headers): String {
val auth = "kuramanime:FDWUjAg6FXZpcbyTAkWrsgS8qAJNDDXKts:${System.currentTimeMillis()}"
val auth = "kuramanime:${scriptToken}ts:${System.currentTimeMillis()}"
.let { Base64.encode(it.toByteArray(), Base64.NO_WRAP) }
.let { Base64.encodeToString(it, Base64.NO_WRAP) }
.let { URLEncoder.encode(it, "UTF-8") }
Expand Down

0 comments on commit d135948

Please sign in to comment.