Skip to content

Commit e0d39b6

Browse files
gechotoStypox
authored andcommitted
correct comment
1 parent 1393644 commit e0d39b6

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static String getDeobfuscationFunctionName(@Nonnull final String javaScriptPlaye
175175
* Get the throttling parameter deobfuscation code of YouTube's base JavaScript file.
176176
*
177177
* @param javaScriptPlayerCode the complete JavaScript base player code
178-
* @return the throttling parameter deobfuscation function name
178+
* @return the throttling parameter deobfuscation function code
179179
* @throws ParsingException if the throttling parameter deobfuscation code couldn't be
180180
* extracted
181181
*/
@@ -238,14 +238,20 @@ private static String validateFunction(@Nonnull final String function) {
238238
return function;
239239
}
240240

241+
/**
242+
*
243+
* @param function
244+
* @return
245+
* @throws Parser.RegexException
246+
*/
241247
@Nonnull
242248
private static String fixupFunction(@Nonnull final String function)
243249
throws Parser.RegexException {
244250
final String firstArgName = Parser
245-
.matchGroup1(FUNCTION_ARGUMENTS_REGEX, function)
251+
.matchGroup1(FUNCTION_ARGUMENTS_REGEX + "aba([a-z]\\d)", function)
246252
.split(",")[0].trim();
247253
final Pattern earlyReturnPattern = Pattern.compile(
248-
EARLY_RETURN_REGEX + firstArgName + ";",
254+
EARLY_RETURN_REGEX + firstArgName + "aba;",
249255
Pattern.DOTALL);
250256
final Matcher earlyReturnCodeMatcher = earlyReturnPattern.matcher(function);
251257
return earlyReturnCodeMatcher.replaceFirst(";");

0 commit comments

Comments
 (0)