yt-dlp is relatively stable, but still occasionally breaks for long periods. I get the sense YouTube is becoming increasingly adversarial to yt-dlp as well.
I don't know the details, but it doesn't seem like yt-dlp is running the entire YouTube JS+DOM environment. Something like a real headless browser seems like it would break less often, but be much heavier weight. And Youtube might have all sorts of other mitigations against this approach.
> yt-dlp is running the entire YouTube JS+DOM environment
IIRC they maintain a minimal execution environment that is able to run just the JS needed to pass a few checks but this breaks too often enough that they're planning to make Node.js or another JS interpreter a hard requirement (possibly already happened).
yt-dlp was very recently broken for ~2 days for any Youtube videos that required cookies: https://github.com/yt-dlp/yt-dlp/issues/16212
Here is what actually fixed it: https://github.com/yt-dlp/ejs/pull/53/changes
yt-dlp is relatively stable, but still occasionally breaks for long periods. I get the sense YouTube is becoming increasingly adversarial to yt-dlp as well.
I don't know the details, but it doesn't seem like yt-dlp is running the entire YouTube JS+DOM environment. Something like a real headless browser seems like it would break less often, but be much heavier weight. And Youtube might have all sorts of other mitigations against this approach.
> yt-dlp is running the entire YouTube JS+DOM environment
IIRC they maintain a minimal execution environment that is able to run just the JS needed to pass a few checks but this breaks too often enough that they're planning to make Node.js or another JS interpreter a hard requirement (possibly already happened).
Pretty much - yt-dlp currently requires Deno to "solve" youtube challenges.
* https://deno.com/
* there may well be other JS interpreters that are accepted, can be used - but solving JS challenges is required for much, if not all, YT content.
> const url = (${generate(expression)})("https://youtube.com/watch?v=yt-dlp-wins", "s", sig);
I'm pretty sure yt-dlp is filled with these kinds of gold.
> I get the sense YouTube is becoming increasingly adversarial to yt-dlp as well.
I rarely use yt-dlp anymore.
Before I just updated. Now when I do that, it usually becomes complex and full of questions.
I think having a hook to an LLM endpoint to enable yt-dlp to attempt to self resolve until an official fix is available would be a useful enhancement.