fix: yt-dlp'ye YouTube cookie desteği ekle (bot-check bypass)
android player_client YouTube'un "Sign in to confirm you're not a bot" duvarını aşmadı — Coolify sunucusunun IP'si datacenter olarak işaretlenmiş. Kimlik doğrulanmış bir tarayıcı oturumunun cookies.txt'i YTDLP_COOKIES_B64 env değişkeni (Coolify'da ayarlandı, repo'da yok) üzerinden container'a taşınıp /tmp'e yazılıyor ve her yt-dlp çağrısına --cookies olarak veriliyor. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { prisma } from "@streamclipper/db";
|
||||
import { env } from "../env";
|
||||
import { QUEUE_NAMES, signalDetectionQueue, type StreamIngestJob } from "../queues";
|
||||
import { redisConnection } from "../redis";
|
||||
import { ytdlpCookieArgs } from "../ytdlpCookies";
|
||||
|
||||
const SEGMENT_LIST_POLL_MS = 5_000;
|
||||
|
||||
@@ -73,7 +74,11 @@ async function runCapture(job: Job<StreamIngestJob>): Promise<void> {
|
||||
|
||||
const ytdlp = spawn(
|
||||
"yt-dlp",
|
||||
["--extractor-args", "youtube:player_client=android", "-f", "best", "-o", "-", youtubeUrl],
|
||||
[
|
||||
"--extractor-args", "youtube:player_client=android",
|
||||
...ytdlpCookieArgs(),
|
||||
"-f", "best", "-o", "-", youtubeUrl,
|
||||
],
|
||||
{ stdio: ["ignore", "pipe", "pipe"] },
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user