Nodejs Application to scrape data of www.nepalstock.com using puppeteer, saving to db and later proving the data over rest api.
- Sequelize: Database ORM.
- Express: Web Server.
- Puppeteer: For scraping the data.
- Setup your env file: Copy the content of .env file and make necessary changes if you have to. See .env.example for reference.
- Migrate tables
yarn sequelize db:migrate
- scrape today floor data
yarn scrape:floor
- scrape trading data The trading scraper currently only scrapes only one company and only the first page. You can change the company, from-date and to-date in the file.
yarn scrape:trade
- Run server
yarn dev:server
API | query params |
---|---|
/api/today-price | limit:number, offset:number |
/api/trading-data | limit:number,offset:number |