From e0d39b606c1d489208eca329610dc967076f80b8 Mon Sep 17 00:00:00 2001 From: gechoto <124326167+gechoto@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:31:23 +0100 Subject: [PATCH] correct comment --- .../youtube/YoutubeThrottlingParameterUtils.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingParameterUtils.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingParameterUtils.java index d9756e388..1fa74a162 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingParameterUtils.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeThrottlingParameterUtils.java @@ -175,7 +175,7 @@ final class YoutubeThrottlingParameterUtils { * Get the throttling parameter deobfuscation code of YouTube's base JavaScript file. * * @param javaScriptPlayerCode the complete JavaScript base player code - * @return the throttling parameter deobfuscation function name + * @return the throttling parameter deobfuscation function code * @throws ParsingException if the throttling parameter deobfuscation code couldn't be * extracted */ @@ -238,14 +238,20 @@ final class YoutubeThrottlingParameterUtils { return function; } + /** + * + * @param function + * @return + * @throws Parser.RegexException + */ @Nonnull private static String fixupFunction(@Nonnull final String function) throws Parser.RegexException { final String firstArgName = Parser - .matchGroup1(FUNCTION_ARGUMENTS_REGEX, function) + .matchGroup1(FUNCTION_ARGUMENTS_REGEX + "aba([a-z]\\d)", function) .split(",")[0].trim(); final Pattern earlyReturnPattern = Pattern.compile( - EARLY_RETURN_REGEX + firstArgName + ";", + EARLY_RETURN_REGEX + firstArgName + "aba;", Pattern.DOTALL); final Matcher earlyReturnCodeMatcher = earlyReturnPattern.matcher(function); return earlyReturnCodeMatcher.replaceFirst(";");