From 516ecee72938dd6def1d76fa028b805beb862ad5 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 14 Nov 2020 21:42:12 +0300 Subject: feat: use incognito mode --- src/handlers/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/index.js b/src/handlers/index.js index 7101250..0f0ab67 100644 --- a/src/handlers/index.js +++ b/src/handlers/index.js @@ -30,6 +30,7 @@ const handleJobAsUser = async (job, browser, user) => { )); await clickElementBySelector(page, 'input#join_button_input'); const conferencePage = await conferencePagePromise; + await page.close(); await attendConference(conferencePage, () => console.log(`Joined the conference at ${conferenceUrl}`)); @@ -47,7 +48,7 @@ const handleJob = async job => { console.log('Participants: ', participants.map(participant => participant.username)); - const browser = await puppeteer.launch({ headless, args: ['--no-sandbox'] }); + const browser = await puppeteer.launch({ headless, args: ['--no-sandbox', '--incognito'] }); try { await Bluebird.map(participants, participant => handleJobAsUser(job, browser, participant)); -- cgit v1.2.3