ArchiveBox icon indicating copy to clipboard operation
ArchiveBox copied to clipboard

Add deno and update yt-dlp

Open davidwilemski opened this issue 1 month ago • 1 comments

Summary

yt-dlp now requires a js runtime and suggests deno >=2.0 https://github.com/yt-dlp/yt-dlp/issues/15012

In addition to updating the yt-dlp package there is now also a recommended external javascript blob that needs to be installed. See the yt-dlp wiki for install options. Here, I've added the [default] dependency group which will also install yt-dlp-ejs containing that blob.

This ensures yt-dlp continues to work. I was seeing some intermittent issues with the media extractor before this. I've tested this branch by building a docker image and running it against my archivebox install and confirming that some URLs now archive media properly.

I don't know how often the yt-dlp-ejs package will end up needing to be updated which may or may not be an argument in favor of eventually having an option to use the option to run the external js from npm but for now this sticks with baking an immutable docker image.

I also wasn't familiar with pdm but to update the pdm lock file I just ran pdm lock which seems to have worked but also updated quite a few other dependencies in that lockfile.

Related issues

Changes these areas

  • [ ] Bugfixes
  • [ ] Feature behavior
  • [ ] Command line interface
  • [ ] Configuration options
  • [ ] Internal architecture
  • [ ] Snapshot data layout on disk

davidwilemski avatar Nov 13 '25 14:11 davidwilemski

We should make sure to use a single JS env for both single-file-cli and yt-dlp, otherwise archivebox will install 2 redundant JS runtimes.

pirate avatar Nov 15 '25 20:11 pirate