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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user