Initial commit
This commit is contained in:
6
getPrice.js
Normal file
6
getPrice.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = async function(page, url) {
|
||||
await page.goto(url);
|
||||
const element = await page.waitForSelector('b.price')
|
||||
const value = await element.evaluate(el => el.textContent);
|
||||
return Number(value)
|
||||
}
|
||||
Reference in New Issue
Block a user