Skip to content

Commit b97c655

Browse files
committed
[YouTube] add new deobfuscation function name regex
Adds a new regex to find the name of the deobfuscation function for throttling, which works for the `59b252b9` player. Closes: #1289
1 parent 61059b1 commit b97c655

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingParameterUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ final class YoutubeThrottlingParameterUtils {
2828

2929
// CHECKSTYLE:OFF
3030
private static final Pattern[] DEOBFUSCATION_FUNCTION_NAME_REGEXES = {
31+
/*
32+
* Matches the following text, where we want m85:
33+
*
34+
* m85=function( ... return Y[45]
35+
*/
36+
Pattern.compile("([A-Za-z0-9_\\$]{2,})=function.*return [A-Z]\\[\\d+\\]"),
37+
3138

3239
/*
3340
* Matches the following text, where we want SDa and the array index accessed:

0 commit comments

Comments
 (0)