debug: playabilityStatus'u teşhis bilgisine ekle

videoDetails yok ama sayfa consent duvarına da takılmıyor (büyük,
tam HTML dönüyor) — YouTube oynatıcı verisini bilerek vermiyor gibi
görünüyor. playabilityStatus.status/.reason genelde tam olarak
nedenini açıklıyor (LOGIN_REQUIRED, UNPLAYABLE, ERROR vb.).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 20:09:04 +03:00
co-authored by Claude Sonnet 5
parent 5447a8d269
commit f18692dd82
+3 -1
View File
@@ -65,10 +65,12 @@ async function findLiveVideoId(channelId: string): Promise<string | null> {
const match = html.match(/"videoDetails":\{"videoId":"([^"]+)"/);
const hasConsentForm = /action="https:\/\/consent\.youtube\.com/.test(html);
const playabilityMatch = html.match(/"playabilityStatus":\{"status":"([^"]*)"(?:,"reason":"([^"]*)")?/);
lastPollDebug.set(
channelId,
`finalUrl=${res.url} htmlLength=${html.length} cookieSent=${Boolean(cookieHeader)} ` +
`hasVideoDetails=${Boolean(match)} hasConsentForm=${hasConsentForm}`,
`hasVideoDetails=${Boolean(match)} hasConsentForm=${hasConsentForm} ` +
`playability=${playabilityMatch ? `${playabilityMatch[1]}/${playabilityMatch[2] ?? ""}` : "n/a"}`,
);
if (!match) return null;