First of all, the price will change only when the stock market is open, so it's useless to run the scraper when the market is closed, and even when it's open, the stock price won't change all the time. With that said, this scraper checks the stock price every second.
Hey, here is the source code with the package.json and package-lock.json files: github.com/matveynikon/Stock_scrap...
It's work if you run node index.js ,but why show 652.81 multiple time?
Dont' work on console .log :(
index.js:2 Uncaught ReferenceError: require is not defined
{
"name": "stocks",
"version": "1.0.0",
"description": "",
"main": "stock.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Me",
"license": "ISC",
"dependencies": {
"puppeteer": "^10.1.0"
}
}
that means that the stock price still hasn't changed
At that time check value of stock, hourly, daily?
First of all, the price will change only when the stock market is open, so it's useless to run the scraper when the market is closed, and even when it's open, the stock price won't change all the time. With that said, this scraper checks the stock price every second.
Thanks a lot, i love your work, and help, cheers!