Skip to content

Commit 91451aa

Browse files
authored
Update puppeteer.ts
1 parent d2b5673 commit 91451aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/_lib/puppeteer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ export async function getScreenshot(url, width, height) {
1919
const page = await getPage();
2020
await page.setViewport({ width: Number(width) || 1280, height: Number(height) || 720, deviceScaleFactor: 2 });
2121
await page.goto(url);
22+
await new Promise(r => setTimeout(r, 3000));
2223
const file = await page.screenshot();
2324
return file;
2425
}
2526

2627

28+
29+

0 commit comments

Comments
 (0)