YouTube downloads fail: no JavaScript runtime for yt-dlp in the api image

未关闭 适合新手
#53 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
docker, php
领域
backend, devops

调研方向

从安装 yt-dlp 的api/Dockerfile中的frankenphp_upstream阶段开始。在那里添加 JavaScript 运行时;如果选择 Node,随后检查YoutubeDlCliDownloader::getConfigFileContents()中生成的 yt-dlp 配置。验证yt-dlp --verbose在 api 容器中报告了运行时,并且提供的 YouTube URL 可以模拟并下载。

由索引模型根据 Issue 内容生成。

描述

bug dependencies

Problem

yt-dlp now needs a JavaScript runtime for YouTube extraction. The api image has none, so YouTube downloads fail. Found while testing #46 / #52.

From yt-dlp --verbose in the api container (yt-dlp 2026.10.26):

[debug] JS runtimes: none
WARNING: [youtube] No supported JavaScript runtime could be found. Only deno is enabled by default; to use another runtime add --js-runtimes RUNTIME[:PATH] to your command/config. YouTube extraction without a JS runtime has been deprecated, and some formats may be missing.
ERROR: [youtube] jNQXAC9IVRw: Requested format is not available. Use --list-formats for a list of available formats

The frankenphp_dev and frankenphp_prod stages both build on frankenphp_upstream, where yt-dlp is installed (api/Dockerfile), so production is affected as well. Because supportsDownloadJob() runs yt-dlp --simulate, YouTube URLs probably can't even be matched to the yt-dlp downloader anymore.

Proposed fix

Install a JavaScript runtime in the frankenphp_upstream stage:

  • deno (enabled by default in yt-dlp, no config change needed), or
  • node plus --js-runtimes node in the generated yt-dlp config (YoutubeDlCliDownloader::getConfigFileContents()).

yt-dlp[default] already pulls in yt_dlp_ejs (listed in the debug output), so only the runtime is missing.

Verification

  • yt-dlp --verbose in the api container shows a JS runtime instead of none.
  • A YouTube URL can be simulated and downloaded, e.g. https://www.youtube.com/watch?v=jNQXAC9IVRw.
主要语言
PHP
星标
1
派生
0
平均合并
3 天 50 分钟
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

FetchDock/fetchdock-server 的其他 Issue

查看 FetchDock/fetchdock-server 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。