From 5667297894f018e75bca6d854153736c686be1b0 Mon Sep 17 00:00:00 2001 From: FourTOne5 <107297513+FourTOne5@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:01:27 +0600 Subject: [PATCH] Rename some variable for Bato.to Closes #1 --- .../src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt index 10a9f893..f2f31ecc 100644 --- a/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt +++ b/src/all/batoto/src/eu/kanade/tachiyomi/extension/all/batoto/BatoTo.kt @@ -460,8 +460,8 @@ open class BatoTo( val script = document.selectFirst("script:containsData(imgHttps):containsData(batoWord):containsData(batoPass)")?.html() ?: throw RuntimeException("Couldn't find script with image data.") - val imgHttpLisString = script.substringAfter("const imgHttps =").substringBefore(";").trim() - val imgHttpLis = json.parseToJsonElement(imgHttpLisString).jsonArray.map { it.jsonPrimitive.content } + val imgHttpsString = script.substringAfter("const imgHttps =").substringBefore(";").trim() + val imageUrls = json.parseToJsonElement(imgHttpsString).jsonArray.map { it.jsonPrimitive.content } val batoWord = script.substringAfter("const batoWord =").substringBefore(";").trim() val batoPass = script.substringAfter("const batoPass =").substringBefore(";").trim() @@ -469,7 +469,7 @@ open class BatoTo( val imgAccListString = CryptoAES.decrypt(batoWord.removeSurrounding("\""), evaluatedPass) val imgAccList = json.parseToJsonElement(imgAccListString).jsonArray.map { it.jsonPrimitive.content } - return imgHttpLis.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) -> + return imageUrls.zip(imgAccList).mapIndexed { i, (imgUrl, imgAcc) -> Page(i, imageUrl = "$imgUrl?$imgAcc") } }