Headless
This commit is contained in:
9
index.js
9
index.js
@@ -1,13 +1,16 @@
|
||||
const puppeteer = require('puppeteer')
|
||||
const items = require('./items')
|
||||
const Output = require('./Output')
|
||||
const output = new Output();
|
||||
const output = require('./output');
|
||||
|
||||
(async () => {
|
||||
const browser = await puppeteer.launch({ headless: false })
|
||||
const browser = await puppeteer.launch({
|
||||
headless: true
|
||||
})
|
||||
const page = await browser.newPage()
|
||||
|
||||
for (const item of items) {
|
||||
console.log(`Looking at ${item.name}`)
|
||||
|
||||
let partsPrice = 0
|
||||
for (const part of item.parts) {
|
||||
partsPrice += await part.getPrice(page)
|
||||
|
||||
Reference in New Issue
Block a user