From e14ee057424768c75c8a7f47a19d2f742da67fc6 Mon Sep 17 00:00:00 2001 From: Owen Roberts Date: Thu, 1 Aug 2024 06:46:46 -0600 Subject: [PATCH] preserve original function name only case --- .../services/youtube/YoutubeThrottlingParameterUtils.java | 7 ++++--- 1 file changed, 4 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 3416fcf71..95ed4264f 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 @@ -127,11 +127,12 @@ final class YoutubeThrottlingParameterUtils { + "known patterns in the base JavaScript player code", e); } + if (matcher.groupCount() == 1) { + return matcher.group(1); + } + final int funcNameIndex = matcher.groupCount() - 1; final String functionName = matcher.group(funcNameIndex); - if (matcher.groupCount() == 1) { - return functionName; - } final int arrayNumIndex = matcher.groupCount(); final int arrayNum = Integer.parseInt(matcher.group(arrayNumIndex));