fix: yt-dlp'ye Node.js JS runtime + EJS solver ekle (n-challenge)
Gerçek capture denemesinde debug endpoint'i asıl nedeni gösterdi: "n challenge solving failed" — YouTube'un imza çözme JS challenge'ı için yt-dlp'nin bir JS runtime'ı yoktu, bu da formatların eksik kalıp "page needs to be reloaded" ile sonuçlanmasına yol açıyordu. node:22-slim zaten Node 22 içeriyor (minimum gereksinim); yt-dlp'yi "yt-dlp[default]" (EJS solver dahil) olarak kurup capture çağrısına --js-runtimes node eklendi. Lokal olarak doğrulandı: aynı video artık formatları hatasız çözüyor. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ FROM node:22-slim
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ffmpeg python3 python3-pip ca-certificates \
|
ffmpeg python3 python3-pip ca-certificates \
|
||||||
&& pip3 install --break-system-packages -U yt-dlp bgutil-ytdlp-pot-provider \
|
&& pip3 install --break-system-packages -U "yt-dlp[default]" bgutil-ytdlp-pot-provider \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ async function runCapture(job: Job<StreamIngestJob>): Promise<void> {
|
|||||||
const ytdlp = spawn(
|
const ytdlp = spawn(
|
||||||
"yt-dlp",
|
"yt-dlp",
|
||||||
[
|
[
|
||||||
|
"--js-runtimes", "node",
|
||||||
...ytdlpAntiBotArgs(),
|
...ytdlpAntiBotArgs(),
|
||||||
"-f", "bestvideo+bestaudio/best", "-o", "-", youtubeUrl,
|
"-f", "bestvideo+bestaudio/best", "-o", "-", youtubeUrl,
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user