Skip to content

Commit b74a8d0

Browse files
committed
Remove manually writing cardinals of regexes
1 parent 2b70b5f commit b74a8d0

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ final class YoutubeThrottlingParameterUtils {
3030
private static final Pattern[] DEOBFUSCATION_FUNCTION_NAME_REGEXES = {
3131

3232
/*
33-
* The first regex matches the following text, where we want SDa and the array index
34-
* accessed:
33+
* Matches the following text, where we want SDa and the array index accessed:
3534
*
3635
* a.D&&(b="nn"[+a.D],WL(a),c=a.j[b]||null)&&(c=SDa[0](c),a.set(b,c),SDa.length||Wma("")
3736
*/
@@ -43,7 +42,7 @@ final class YoutubeThrottlingParameterUtils {
4342
+ MULTIPLE_CHARS_REGEX + ")" + ARRAY_ACCESS_REGEX),
4443

4544
/*
46-
* The second regex matches the following text, where we want Wma:
45+
* Matches the following text, where we want Wma:
4746
*
4847
* a.D&&(b="nn"[+a.D],WL(a),c=a.j[b]||null)&&(c=SDa[0](c),a.set(b,c),SDa.length||Wma("")
4948
*/
@@ -55,8 +54,7 @@ final class YoutubeThrottlingParameterUtils {
5554
+ ")\\(\"\"\\)"),
5655

5756
/*
58-
* The third regex matches the following text, where we want SDa and the array index
59-
* accessed:
57+
* Matches the following text, where we want cvb and the array index accessed:
6058
*
6159
* ,Vb(m),W=m.j[c]||null)&&(W=cvb[0](W),m.set(c,W)
6260
*/
@@ -70,7 +68,7 @@ final class YoutubeThrottlingParameterUtils {
7068
+ "\\)"),
7169

7270
/*
73-
* The fourth regex matches the following text, where we want rma:
71+
* Matches the following text, where we want rma:
7472
*
7573
* a.D&&(b="nn"[+a.D],c=a.get(b))&&(c=rDa[0](c),a.set(b,c),rDa.length||rma("")
7674
*/
@@ -80,8 +78,7 @@ final class YoutubeThrottlingParameterUtils {
8078
+ MULTIPLE_CHARS_REGEX + ")\\(\"\"\\)"),
8179

8280
/*
83-
* The fifth regex matches the following text, where we want rDa and the array index
84-
* accessed:
81+
* Matches the following text, where we want rDa and the array index accessed:
8582
*
8683
* a.D&&(b="nn"[+a.D],c=a.get(b))&&(c=rDa[0](c),a.set(b,c),rDa.length||rma("")
8784
*/
@@ -91,8 +88,7 @@ final class YoutubeThrottlingParameterUtils {
9188
+ MULTIPLE_CHARS_REGEX + "=(" + MULTIPLE_CHARS_REGEX + ")\\[(\\d+)]"),
9289

9390
/*
94-
* The sixth regex matches the following text, where we want BDa and the array index
95-
* accessed:
91+
* Matches the following text, where we want BDa and the array index accessed:
9692
*
9793
* (b=String.fromCharCode(110),c=a.get(b))&&(c=BDa[0](c)
9894
*/
@@ -103,8 +99,7 @@ final class YoutubeThrottlingParameterUtils {
10399
+ SINGLE_CHAR_VARIABLE_REGEX + "\\)"),
104100

105101
/*
106-
* The seventh regex matches the following text, where we want Yva and the array index
107-
* accessed:
102+
* Matches the following text, where we want Yva and the array index accessed:
108103
*
109104
* .get("n"))&&(b=Yva[0](b)
110105
*/

0 commit comments

Comments
 (0)