diff --git a/src/id/kuramanime/build.gradle b/src/id/kuramanime/build.gradle index e52e4a29a6..bdd5b83b8a 100644 --- a/src/id/kuramanime/build.gradle +++ b/src/id/kuramanime/build.gradle @@ -7,7 +7,7 @@ ext { extName = 'Kuramanime' pkgNameSuffix = 'id.kuramanime' extClass = '.Kuramanime' - extVersionCode = 9 + extVersionCode = 10 libVersion = '13' } diff --git a/src/id/kuramanime/src/eu/kanade/tachiyomi/animeextension/id/kuramanime/Kuramanime.kt b/src/id/kuramanime/src/eu/kanade/tachiyomi/animeextension/id/kuramanime/Kuramanime.kt index 32f685d4f2..ea290a28ae 100644 --- a/src/id/kuramanime/src/eu/kanade/tachiyomi/animeextension/id/kuramanime/Kuramanime.kt +++ b/src/id/kuramanime/src/eu/kanade/tachiyomi/animeextension/id/kuramanime/Kuramanime.kt @@ -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") }