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

Đang mở Phù hợp với người mới
#53 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
77/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, php
Lĩnh vực
backend, devops

Hướng nghiên cứu

Bắt đầu với giai đoạn frankenphp_upstream trong api/Dockerfile, nơi yt-dlp được cài đặt. Thêm môi trường chạy JavaScript vào đó, sau đó kiểm tra cấu hình yt-dlp được tạo trong YoutubeDlCliDownloader::getConfigFileContents() nếu chọn Node. Xác minh rằng yt-dlp --verbose báo cáo một môi trường chạy trong container api và URL YouTube được cung cấp có thể được mô phỏng và tải xuống.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
PHP
Star
1
Fork
0
Merge trung bình
3 ngày 50 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của FetchDock/fetchdock-server

Tất cả issue của FetchDock/fetchdock-server

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.