This commit is contained in:
2022-02-16 01:42:05 +03:00
parent d5d5e5d59c
commit be9b8a97dd
2 changed files with 9 additions and 4 deletions

View File

@@ -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)