Standard js

This commit is contained in:
2022-02-15 22:27:06 +03:00
parent 58530bf433
commit efafcbc356
9 changed files with 3676 additions and 19 deletions

View File

@@ -1,17 +1,17 @@
const puppeteer = require('puppeteer');
const getPrice = require('./getPrice');
const items = require("./items");
const puppeteer = require('puppeteer')
const getPrice = require('./getPrice')
const items = require('./items')
const marketUrl = 'https://warframe.market/items/';
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
const browser = await puppeteer.launch({ headless: false })
const page = await browser.newPage()
for (item of items) {
for (const item of items) {
let partsPrice = 0
for (part of item.parts) {
partsPrice += await getPrice(page, marketUrl + part.url);
for (const part of item.parts) {
partsPrice += await getPrice(page, marketUrl + part.url)
}
const setPrice = await getPrice(page, marketUrl + item.url)
@@ -20,5 +20,5 @@ const marketUrl = 'https://warframe.market/items/';
}
}
await browser.close();
})();
await browser.close()
})()