Give yt-dlp a JavaScript runtime to avoid YouTube's bot checks

Downloads failed with "Sign in to confirm you're not a bot" even with
cookies and a working proxy. yt-dlp was also warning that no JavaScript
runtime was available: YouTube's player challenges now require one, and
without it extraction degrades into exactly those bot checks.

The image already ships Node, so yt-dlp is pointed at it via
--js-runtimes, but only after confirming the installed build understands
the flag — an older binary would otherwise fail on an unknown option.
Startup logs which runtime was picked and warns when there is none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-09-09 00:34:42 +03:00
co-authored by Claude Opus 5
parent 71dc3f2da8
commit 2ee907626e
5 changed files with 64 additions and 6 deletions
+2
View File
@@ -53,6 +53,8 @@ const schema = z.object({
),
/** Extra `--extractor-args` values, separated by ";" — e.g. youtube:player_client=default,web_safari */
YTDLP_EXTRACTOR_ARGS: z.string().optional(),
/** JS runtime yt-dlp uses for YouTube's player challenges; "" disables the flag. */
YTDLP_JS_RUNTIME: z.string().default("node"),
LOCAL_MEDIA_DIR: z.string().optional(),
DEFAULT_VOLUME: z.coerce.number().min(0).max(200).default(60),