We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93b9076 commit 017756dCopy full SHA for 017756d
get-image.js
@@ -4,10 +4,16 @@ module.exports = async url => {
4
// disable sandbox in production
5
const browser = await puppeteer.launch({
6
slowMo: 100,
7
+ // headless: false,
8
args: process.env.NODE_ENV === 'production' ? ['--no-sandbox'] : []
9
});
10
- const page = await browser.newPage();
11
+ const context = await browser.createIncognitoBrowserContext();
12
+ const page = await context.newPage();
13
+
14
+ // accept the "replace drawing" dialog if it shows up
15
+ page.on('dialog', dialog => dialog.accept());
16
17
await page.goto(url);
18
await page.click('[aria-label=Export]');
19
0 commit comments