From e43dde03f9cae7a567dc5b9290baa13a23864b6d Mon Sep 17 00:00:00 2001 From: Ondrej Synacek Date: Wed, 16 Oct 2019 09:07:20 +0200 Subject: [PATCH] switch puppeteer to headless --- lib/crawler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/crawler.js b/lib/crawler.js index 96a1287..8275dbe 100644 --- a/lib/crawler.js +++ b/lib/crawler.js @@ -2,7 +2,10 @@ const puppeteer = require('puppeteer') const crawl = async (url) => { console.log(`crawl started for URL ${url}`) - const browser = await puppeteer.launch() + const browser = await puppeteer.launch({ + headless: true, + args: [ '--no-sandbox' ], + }) const page = await browser.newPage() await page.goto(url)