mirror of
https://github.com/ershisan99/scrape-icp.git
synced 2025-12-17 05:09:27 +00:00
make playwright headless and install deps before start
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nodemon src/index.ts",
|
"dev": "nodemon src/index.ts",
|
||||||
"start": "ts-node-esm src/index.ts"
|
"start": "npx playwright install-deps && ts-node-esm src/index.ts"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "Andres",
|
"author": "Andres",
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const step6 = async (page: Page) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scrape = async () => {
|
const scrape = async () => {
|
||||||
const browser = await chromium.launch({ headless: false })
|
const browser = await chromium.launch()
|
||||||
try {
|
try {
|
||||||
const page = await browser.newPage()
|
const page = await browser.newPage()
|
||||||
await step1(page)
|
await step1(page)
|
||||||
|
|||||||
Reference in New Issue
Block a user