Skip to content

Commit 6962eab

Browse files
authored
Update puppeteer.ts
1 parent 018c3c8 commit 6962eab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

api/_lib/puppeteer.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ async function getPage() {
1919
export async function getScreenshot(url, width, height) {
2020
const page = await getPage();
2121
await page.setViewport({ width: Number(width) || 1280, height: Number(height) || 720, deviceScaleFactor: 2 });
22-
await page.goto(url, {
23-
waitUntil: 'domcontentloaded',
24-
});
22+
await page.goto(url);
23+
await new Promise(r => setTimeout(r, 3000));
2524
const file = await page.screenshot();
2625
return file;
2726
}

0 commit comments

Comments
 (0)