fix Rabbitstream (#573)

Co-authored-by: Sofie99 <Sofie99@gmail.com>
This commit is contained in:
Sofie 2023-08-25 15:58:58 +07:00 committed by GitHub
parent b38a9b1ff5
commit 2d82480398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,6 @@ open class Rabbitstream : ExtractorApi() {
override val requiresReferer = false
open val embed = "ajax/embed-4"
open val key = "https://raw.githubusercontent.com/enimax-anime/key/e4/key.txt"
private var rawKey: String? = null
override suspend fun getUrl(
url: String,
@ -82,9 +81,10 @@ open class Rabbitstream : ExtractorApi() {
)
}
}
private suspend fun getRawKey(): String = rawKey ?: app.get(key).text.also { rawKey = it }
private suspend fun getRawKey(): String = app.get(key).text
private fun extractRealKey(originalString: String?, stops: String): Pair<String, String> {
val table = parseJson<List<List<Int>>>(stops)