fix(id/kuramanime): Fix video list again (#2555)

This commit is contained in:
Claudemirovsky 2023-11-26 16:52:46 -03:00 committed by GitHub
parent 39e78c181e
commit d13594832a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -7,7 +7,7 @@ ext {
extName = 'Kuramanime'
pkgNameSuffix = 'id.kuramanime'
extClass = '.Kuramanime'
extVersionCode = 9
extVersionCode = 10
libVersion = '13'
}

View File

@ -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") }