feat: wait for 15s before execute the keepAlive strategy
This commit is contained in:
@ -24,6 +24,8 @@ async function spawn(context: BrowserContext, targetUrl: string) {
|
|||||||
}
|
}
|
||||||
await targetInput.fill(targetUrl);
|
await targetInput.fill(targetUrl);
|
||||||
await targetInput.press("Enter");
|
await targetInput.press("Enter");
|
||||||
|
logger.info(`[${spawnId}] Navigating to ${targetUrl}`);
|
||||||
|
await page.waitForTimeout(15000); // Wait for 15 second to let the page load
|
||||||
// Keep-alive the page open for 5 minutes then refresh
|
// Keep-alive the page open for 5 minutes then refresh
|
||||||
if (targetUrl.startsWith("https://www.twitch.tv/")) {
|
if (targetUrl.startsWith("https://www.twitch.tv/")) {
|
||||||
await twitch.keepAlive(page, spawnId);
|
await twitch.keepAlive(page, spawnId);
|
||||||
|
|||||||
Reference in New Issue
Block a user