4 ms·
They need to run a JavaScript function to download YouTube videos at normal speeds. Edit: it's also required to download music, otherwise it will just fail So
by rany_ 4y ago
They need to run a JavaScript function to download YouTube videos at normal speeds.
Edit: it's also required to download music, otherwise it will just fail
Source:
- https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-894619419 https://github.com/ytdl-org/youtube-dl/issues/29326#issuecom...
- https://github.com/ytdl-org/youtube-dl/blob/d619dd712f63aab1964f8fdde9ceea514a5e581d/youtube_dl/extractor/youtube.py#L1484-L1500 https://github.com/ytdl-org/youtube-dl/blob/d619dd712f63aab1...
- https://github.com/ytdl-org/youtube-dl/commit/cf001636600430b4b03963238c14a11c33d6d013 https://github.com/ytdl-org/youtube-dl/commit/cf001636600430...
- ajkjk 4y agoWow: Overview of the control flow (already known): The Youtube API provides you with n - your video access token If their new changes apply to your client (they do for "web") then it is expected your client will modify n based on internal logic. This logic is inside player...base.js n is modified by a cryptic function Modified n is sent back to server as proof that we're an official client. If you send n unmodified, the server will eventually throttle you. So they can always change the function to keep you on your toes, hence you need to be able to run semi-arbitrary JS in order to keep using the API. Waste of human brainpower but I guess that energy is better spent imagining a world where Google isn't in charge instead of kvetching about what they're doing with their influence.
- isatty 4y agoThere is a reason Google is able to serve the amount of video bandwidth, and also a reason why there are no worthwhile youtube clones. Some amount of scrape protection is absolutely essential.
- Aperocky 4y agoSeems like they ultimately failed, youtube-dl is available freely as a pip package, anyone with scraping intent would have been able to use it.