3 ms·
I think it's a bit of an understatement to say that YouTube video content URLs are just obfuscated. I don't think this is referring to the youtube.com URLs of p
by varenc 3y ago
I think it's a bit of an understatement to say that YouTube video content URLs are just obfuscated. I don't think this is referring to the youtube.com URLs of public videos, which are public so not "obfuscated", but the underlying URLs that serve the raw video data to the client. These are temporary and generated per-client.
While only paid content and some special videos use the serious DRM that requires browser extensions like WideVine, all YouTube videos require a pretty complex process to download.
Famously, yt-dlp has its own minimal JavaScript interpreter which is needed to evaluate the obfuscated JS script[0] that YouTube provides so the client can determine its actual video download URL. The end of the process does just result in figuring out an obfuscated URL but that URL is temporary and limited per-client. Here's the yt-dlp JS interpreter (though I don't know in which situations it actually needs to use it): https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/jsinterp.py https://github.com/ytdl-org/youtube-dl/blob/master/youtube_d...
[0] Some of YouTube's obfuscated JS: https://www.youtube.com/s/player/bbe1b497/player_ias.vflset/en_US/base.js https://www.youtube.com/s/player/bbe1b497/player_ias.vflset/...