From ba7836b0a1fd5bcda86563f70497ab678668a07e Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Sun, 2 Jun 2024 02:31:37 -0500 Subject: [PATCH] SlimeRead: Fix regex (#3350) * fix regex * mfw the script is minified --- src/pt/slimeread/build.gradle | 2 +- .../src/eu/kanade/tachiyomi/extension/pt/slimeread/SlimeRead.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pt/slimeread/build.gradle b/src/pt/slimeread/build.gradle index 70bc9d75e..8e3dd50c9 100644 --- a/src/pt/slimeread/build.gradle +++ b/src/pt/slimeread/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'SlimeRead' extClass = '.SlimeRead' - extVersionCode = 10 + extVersionCode = 11 isNsfw = true } diff --git a/src/pt/slimeread/src/eu/kanade/tachiyomi/extension/pt/slimeread/SlimeRead.kt b/src/pt/slimeread/src/eu/kanade/tachiyomi/extension/pt/slimeread/SlimeRead.kt index b9f8bba55..0aca1ec43 100644 --- a/src/pt/slimeread/src/eu/kanade/tachiyomi/extension/pt/slimeread/SlimeRead.kt +++ b/src/pt/slimeread/src/eu/kanade/tachiyomi/extension/pt/slimeread/SlimeRead.kt @@ -58,7 +58,7 @@ class SlimeRead : HttpSource() { val script = initClient.newCall(GET(scriptUrl, headers)).execute().body.string() val apiUrl = FUNCTION_REGEX.find(script)?.value?.let { function -> BASEURL_VAL_REGEX.find(function)?.groupValues?.get(1)?.let { baseUrlVar -> - val regex = """let.*?$baseUrlVar\s*=.*?(?=,)""".toRegex(RegexOption.DOT_MATCHES_ALL) + val regex = """let.*?$baseUrlVar\s*=.*?(?=,\s*\w\s*=)""".toRegex(RegexOption.DOT_MATCHES_ALL) regex.find(function)?.value?.let { varBlock -> try { QuickJs.create().use {