We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb3813b commit 6150da1Copy full SHA for 6150da1
1 file changed
api/_lib/puppeteer.ts
@@ -19,9 +19,8 @@ export async function getScreenshot(url, width, height) {
19
const page = await getPage();
20
await page.setViewport({ width: Number(width) || 1280, height: Number(height) || 720, deviceScaleFactor: 2 });
21
await page.goto(url {
22
- waitUntil: 'domcontentloaded',
+ waitUntil: 'networkidle0',
23
});
24
- await new Promise(r => setTimeout(r, 5000));
25
const file = await page.screenshot();
26
return file;
27
}
0 commit comments