Improve new regex to account for more context

This commit is contained in:
Stypox 2025-01-26 12:55:07 +01:00
parent ca9f1935d3
commit 2b70b5f737
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -58,14 +58,16 @@ final class YoutubeThrottlingParameterUtils {
* The third regex matches the following text, where we want SDa and the array index * The third regex matches the following text, where we want SDa and the array index
* accessed: * accessed:
* *
* WL(a),c=a.j[b]||null)&&(c=SDa[0](c) * ,Vb(m),W=m.j[c]||null)&&(W=cvb[0](W),m.set(c,W)
*/ */
Pattern.compile(MULTIPLE_CHARS_REGEX + "\\(" Pattern.compile("," + MULTIPLE_CHARS_REGEX + "\\("
+ MULTIPLE_CHARS_REGEX + "\\)," + MULTIPLE_CHARS_REGEX + "=" + MULTIPLE_CHARS_REGEX + "\\)," + MULTIPLE_CHARS_REGEX + "="
+ MULTIPLE_CHARS_REGEX + "\\." + MULTIPLE_CHARS_REGEX + "\\[" + MULTIPLE_CHARS_REGEX + "\\." + MULTIPLE_CHARS_REGEX + "\\["
+ MULTIPLE_CHARS_REGEX + "]\\|\\|null\\)&&\\(" + MULTIPLE_CHARS_REGEX + "=(" + MULTIPLE_CHARS_REGEX + "]\\|\\|null\\)&&\\(\\b" + MULTIPLE_CHARS_REGEX + "=("
+ MULTIPLE_CHARS_REGEX + ")" + ARRAY_ACCESS_REGEX + MULTIPLE_CHARS_REGEX + ")" + ARRAY_ACCESS_REGEX + "\\("
+ "\\(" + MULTIPLE_CHARS_REGEX + "\\)"), + SINGLE_CHAR_VARIABLE_REGEX + "\\)," + MULTIPLE_CHARS_REGEX
+ "\\.set\\((?:\"n+\"|" + MULTIPLE_CHARS_REGEX + ")," + MULTIPLE_CHARS_REGEX
+ "\\)"),
/* /*
* The fourth regex matches the following text, where we want rma: * The fourth regex matches the following text, where we want rma: