Throttling/n-parameter deobfuscation not working
Currently the n-Parameter deobfuscation is not working (we get an empty string for n).
We should check if this is still required and if so try to fix it.
Reference code (check if it works before porting)
- from yt-dlp: https://github.com/ytdl-org/youtube-dl/blob/a084c80f7bac9ae343075a97cc0fb2c1c96ade89/youtube_dl/extractor/youtube.py#L1878-L2011
- from invidious: https://github.com/iv-org/inv_sig_helper/blob/master/src/player.rs
Just for the protocol from Matrix:
Stypox Maybe it was caused by https://github.com/TeamNewPipe/NewPipeExtractor/pull/1290 Anyway, it's not currently used iirc, except for a fallback method somewhere (maybe for age-restricted videos? AudricV probably remembers). But you never know, maybe we'll need to do a hotfix at some point where we'll need to temporarily switch to a different client that has n-params, and in that case it'd be good to have the code ready.
AudricV Your guess is right, even if YouTube is testing a new player calling external functions in variables if I remember properly
So I guess this can be removed completely...
Mod note: Context: additional information/update about how ytdlp does this
ytdlp; Up until now, yt-dlp has been able to use its built-in JavaScript "interpreter" to solve the JavaScript challenges that are required for YouTube downloads. But due to https://github.com/yt-dlp/yt-dlp/issues/14400, the built-in JS interpreter will soon be insufficient for this purpose.
There is a personal implementation of grayjay or ytdlp for this. I wrote about this in the Matrix. But I wanted to mention it here. If Newpipe improves this, it means you don't have to update it every time.
ytdlp Deno;
uses; https://github.com/yt-dlp/ejs pr; https://github.com/yt-dlp/yt-dlp/pull/14157
or using the smaller size Quickjs
ytdlp support this
https://github.com/yt-dlp/yt-dlp/issues/14431
https://github.com/yausername/youtubedl-android/pull/338