From 3b25016b93f303cf8b087ca85a96fcccbd922388 Mon Sep 17 00:00:00 2001 From: andres Date: Mon, 13 Mar 2023 23:49:36 +0100 Subject: [PATCH] make playwright headless and install deps before start --- package.json | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2057e45..20c00e1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "dev": "nodemon src/index.ts", - "start": "ts-node-esm src/index.ts" + "start": "npx playwright install-deps && ts-node-esm src/index.ts" }, "keywords": [], "author": "Andres", diff --git a/src/index.ts b/src/index.ts index 39efb22..dd5ca13 100644 --- a/src/index.ts +++ b/src/index.ts @@ -101,7 +101,7 @@ const step6 = async (page: Page) => { } const scrape = async () => { - const browser = await chromium.launch({ headless: false }) + const browser = await chromium.launch() try { const page = await browser.newPage() await step1(page)