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:
@@ -4,6 +4,7 @@ import { prisma } from "@streamclipper/db";
|
||||
import { env } from "./env";
|
||||
import { streamIngestQueue } from "./queues";
|
||||
import { sendTelegramMessage } from "./telegram";
|
||||
import { ytdlpCookieArgs } from "./ytdlpCookies";
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
|
||||
@@ -32,6 +33,7 @@ async function findLiveVideoId(channelId: string): Promise<string | null> {
|
||||
"--simulate",
|
||||
"--no-warnings",
|
||||
"--extractor-args", "youtube:player_client=android",
|
||||
...ytdlpCookieArgs(),
|
||||
"--print", "%(id)s",
|
||||
liveUrl,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user