mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-12 05:59:20 +00:00
🐛 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:
1 parent
09746c5e66
commit
64d2c7ff96
1 file changed
+5
-1
+5
-1
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user