Initial commit

This commit is contained in:
2022-02-15 22:07:56 +03:00
commit 58530bf433
8 changed files with 1114 additions and 0 deletions

24
index.js Normal file
View File

@@ -0,0 +1,24 @@
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();
for (item of items) {
let partsPrice = 0
for (part of item.parts) {
partsPrice += await getPrice(page, marketUrl + part.url);
}
const setPrice = await getPrice(page, marketUrl + item.url)
if (partsPrice < setPrice) {
console.log(item.name, partsPrice, setPrice)
}
}
await browser.close();
})();