Skip to content

Commit a9f0176

Browse files
committed
Update n function regex... again.
1 parent 6367b9d commit a9f0176

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ replay_pid*
2929
*/build/*
3030
build
3131

32-
application.yml
32+
application.yml
33+
playerconfigs/*

common/src/main/java/dev/lavalink/youtube/cipher/SignatureCipherManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ public class SignatureCipherManager {
8181
private static final Pattern timestampPattern = Pattern.compile("(signatureTimestamp|sts):(\\d+)");
8282
private static final Pattern nFunctionPattern = Pattern.compile(
8383
"function\\(\\s*(\\w+)\\s*\\)\\s*\\{" +
84-
"var\\s*(\\w+)=(?:\\1\\.split\\(\"\"\\)|String\\.prototype\\.split\\.call\\(\\1,\"\"\\))," +
84+
"var\\s*(\\w+)=(?:\\1\\.split\\(\"\"\\)|String\\.prototype\\.split\\.call\\(\\1,.*?\\))," +
8585
"\\s*(\\w+)=(\\[.*?]);\\s*\\3\\[\\d+]" +
86-
"(.*?try)(\\{.*?})catch\\(\\s*(\\w+)\\s*\\)\\s*\\" +
87-
"{\\s*return\"enhanced_except_([A-z0-9-]+)\"\\s*\\+\\s*\\1\\s*}" +
88-
"\\s*return\\s*(\\2\\.join\\(\"\"\\)|Array\\.prototype\\.join\\.call\\(\\2,\"\"\\))};", Pattern.DOTALL
86+
"(.*?try)(\\{.*?})catch\\(\\s*(\\w+)\\s*\\)\\s*\\{" +
87+
"\\s*return\"enhanced_except_([A-z0-9-]+)\"\\s*\\+\\s*\\1\\s*}" +
88+
"\\s*return\\s*(\\2\\.join\\(\"\"\\)|Array\\.prototype\\.join\\.call\\(\\2,.*?\\))};", Pattern.DOTALL
8989
);
9090

9191
private final ConcurrentMap<String, SignatureCipher> cipherCache;

0 commit comments

Comments
 (0)