This commit is contained in:
Sparticuz 2023-02-10 14:31:43 -05:00
parent 0f1d01e4c8
commit 0b03ea9de2
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,5 @@
const puppeteer = require("puppeteer-core");
const chromium = require('@sparticuz/chromium');
const chromium = require("@sparticuz/chromium");
const handler = async () => {
try {
@ -21,10 +21,9 @@ const handler = async () => {
await page.close();
await browser.close();
} catch (error) {
throw new Error(error.message);
}
};
handler();
handler().then(() => console.log("Done"));

View File

@ -1,5 +1,5 @@
const puppeteer = require("puppeteer-core");
const chromium = require('@sparticuz/chromium');
const chromium = require("@sparticuz/chromium");
module.exports = {
handler: async () => {
@ -22,9 +22,8 @@ module.exports = {
await page.close();
await browser.close();
} catch (error) {
throw new Error(error.message);
}
}
},
};