fix: install Node.js and use web client for YouTube n-challenge solving
- ios player client doesn't support cookies, switch to web - Node.js is required for yt-dlp to solve YouTube's n-challenge; without it only image formats are served
This commit is contained in:
@@ -3,6 +3,7 @@ FROM python:3.11-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
curl \
|
||||
nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -47,7 +47,7 @@ async def extract_audio(url: str) -> Path:
|
||||
"--audio-format", "mp3",
|
||||
"--audio-quality", "128K",
|
||||
"--format", "bestaudio/best/b",
|
||||
"--extractor-args", "youtube:player_client=ios,web",
|
||||
"--extractor-args", "youtube:player_client=web",
|
||||
"--output", outtmpl,
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user