Article 70ACN yt-dlp will soon require a full JS runtime to overcome YouTube’s JS challenges

yt-dlp will soon require a full JS runtime to overcome YouTube’s JS challenges

by
Thom Holwerda
from OSnews on (#70ACN)

If you download YouTube videos, there's a real chance you're using yt-dlp, the long-running and widely-used command-line program for downloading YouTube videos. Even if you're not using it directly, many other tools for downloading YouTube videos are built on top of yt-dlp, and even some media players which offer YouTube playback use it in the background. Now, yt-dlp has always had a built-in basic JavaScript interpreter", but due to changes at YouTube, yt-dlp will soon require a proper JavaScript runtime in order to function.

Up until now, yt-dlp has been able to use itsbuilt-in JavaScript interpreter"to solve the JavaScript challenges that are required for YouTube downloads. But due torecent changes on YouTube's end, the built-in JS interpreter will soon be insufficient for this purpose. The changes are so drastic thatyt-dlp will need to leverage a proper JavaScript runtime in order to solve the JS challenges.

Yt-dlp's announcement on GitHub

The yt-dlp team suggests using Deno, but compatibility with some alternatives has been added as well. The issue is that the interpreter" yt-dlp already includes consists of a massive set of very complex regex patterns to solve JS challenges, and those are difficult to maintain and no longer sufficient, so a real runtime is necessary for YouTube downloads. Deno is advised because it's entirely self-contained and sandboxed, and has no network or filesystem access of any kind. Deno also happens to be a single, portable executable.

As time progresses, it seems yt-dlp is slowly growing into a web browser just to be able to download YouTube videos. I wonder what kind of barriers YouTube will throw up next, and what possible solutions from yt-dlp might look like.

External Content
Source RSS or Atom Feed
Feed Location http://www.osnews.com/files/recent.xml
Feed Title OSnews
Feed Link https://www.osnews.com/
Reply 0 comments