🐛 Tolerate navigation timeouts in processUsers script

Wait for load instead of networkidle2 and take the screenshot even when a third-party script stalls the load event.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
NunoandClaude Fable 5.1 committed 2026-11-11 20:09:36 +00:00
1 parent 09746c5e66
commit 64d2c7ff96
1 file changed
+5 -1
+5 -1
View File
@@ -98,7 +98,11 @@ function generateDirName(seed, index) {
for (const lang of targetLangs) {
await fs.writeFile(dir + `/index.${lang}.md`, userMDFile);
}
await page.goto(user.url, { waitUntil: "networkidle2", timeout: 30000 });
try {
await page.goto(user.url, { waitUntil: "load", timeout: 30000 });
} catch (err) {
console.warn(` warning: ${user.url} did not finish loading (${err.message}); taking screenshot anyway`);
}
await new Promise(resolve => setTimeout(resolve, 2000));
await page.screenshot({ path: dir + "/feature.webp", type: "webp", quality: 50 });
}