From d73de6b12dbc5d2036816df405dd7de36032549d Mon Sep 17 00:00:00 2001 From: AudricV <74829229+AudricV@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:13:09 +0200 Subject: [PATCH] [YouTube] Don't provide streaming URLs which have an non-decoded n param This param used to throttle bandwidth of streaming URLs which have this parameter when the correct value is not provided but it is not the case anymore, as the streaming URLs return now an HTTP response code 403 in this case. --- .../extractors/YoutubeStreamExtractor.java | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 84797217b..e6fb7c1b4 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -634,28 +634,6 @@ public class YoutubeStreamExtractor extends StreamExtractor { getVideoStreamBuilderHelper(true), "video-only"); } - /** - * Try to deobfuscate a streaming URL and fall back to the given URL, because decryption may - * fail if YouTube changes break something. - * - *
- * This way a breaking change from YouTube does not result in a broken extractor. - *
- * - * @param streamingUrl the streaming URL to which deobfuscating its throttling parameter if - * there is one - * @param videoId the video ID to use when extracting JavaScript player code, if needed - */ - private String tryDeobfuscateThrottlingParameterOfUrl(@Nonnull final String streamingUrl, - @Nonnull final String videoId) { - try { - return YoutubeJavaScriptPlayerManager.getUrlWithThrottlingParameterDeobfuscated( - videoId, streamingUrl); - } catch (final ParsingException e) { - return streamingUrl; - } - } - @Override @Nonnull public List