fix: check consent button every second

This commit is contained in:
2025-04-13 00:34:57 +07:00
parent cb427a9fa4
commit 50c5927be7
2 changed files with 6 additions and 4 deletions

View File

@ -36,8 +36,7 @@ async function spawn(context: BrowserContext, targetUrl: string, spawnId: string
await page.waitForTimeout(15000); // Wait for 15 second to let the page load
// Keep-alive the page open for 5 minutes then refresh
if (targetUrl.startsWith("https://www.twitch.tv/")) {
logger.info(`[${spawnId}] Twitch URL detected, initializing...`);
await twitch.init(page, spawnId);
logger.info(`[${spawnId}] Twitch URL detected, using Twitch mode...`);
await twitch.keepAlive(page, spawnId);
} else {
logger.warn(`[${spawnId}] Unsupported URL: ${targetUrl}`);