SlimeRead: Fix regex (#3350)

* fix regex

* mfw the script is minified
This commit is contained in:
bapeey 2024-06-02 02:31:37 -05:00 committed by Draff
parent df5abd131b
commit ba7836b0a1
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'SlimeRead'
extClass = '.SlimeRead'
extVersionCode = 10
extVersionCode = 11
isNsfw = true
}

View File

@ -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 {