Skip to content

Commit 018c3c8

Browse files
authored
Update puppeteer.ts
1 parent 2e70175 commit 018c3c8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

api/_lib/puppeteer.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ async function getPage() {
77
const options = {
88
args: [...chromium.args, '--hide-scrollbars', '--disable-web-security'],
99
defaultViewport: chromium.defaultViewport,
10-
executablePath: await chromium.executablePath(
11-
`https://github.com/Sparticuz/chromium/releases/download/v116.0.0/chromium-v116.0.0-pack.tar`
12-
),
10+
executablePath: await chromium.executablePath(),
1311
headless: chromium.headless,
1412
ignoreHTTPSErrors: true,
1513
};
@@ -24,7 +22,6 @@ export async function getScreenshot(url, width, height) {
2422
await page.goto(url, {
2523
waitUntil: 'domcontentloaded',
2624
});
27-
await new Promise(r => setTimeout(r, 5000));
2825
const file = await page.screenshot();
2926
return file;
3027
}

0 commit comments

Comments
 (0)