From bd32e28a918a6c1300afd048846968017f550260 Mon Sep 17 00:00:00 2001 From: nstarikov Date: Wed, 2 Sep 2026 19:46:34 +0300 Subject: [PATCH] Fix YouTube downloads with JavaScript runtime --- Dockerfile | 2 +- app/worker.py | 2 +- requirements-yt-dlp.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 734fef3..5b222f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV PYTHONUNBUFFERED=1 WORKDIR /app RUN apt-get update \ - && apt-get install -y --no-install-recommends ffmpeg ca-certificates libgomp1 \ + && apt-get install -y --no-install-recommends ffmpeg ca-certificates libgomp1 nodejs \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt requirements-yt-dlp.txt ./ diff --git a/app/worker.py b/app/worker.py index 6ad1226..a4c814c 100644 --- a/app/worker.py +++ b/app/worker.py @@ -399,7 +399,7 @@ def command_progress_percent(stage: str, line: str) -> int | None: def ytdlp_base_args() -> list[str]: - args = ["yt-dlp"] + args = ["yt-dlp", "--js-runtimes", "node"] cookies = Path(settings.ytdlp_cookies_path) if cookies.exists(): args.extend(["--cookies", str(cookies)]) diff --git a/requirements-yt-dlp.txt b/requirements-yt-dlp.txt index 1143e6f..eb2848c 100644 --- a/requirements-yt-dlp.txt +++ b/requirements-yt-dlp.txt @@ -1 +1 @@ -yt-dlp==2026.7.4 +yt-dlp[default]==2026.8.19