Web Scraper
Practice Problems
Assignment Questions
Assignment Questions
Problem Statement
Relevel is facing issues in getting updates on the stock market. So, they have planned to build an application
that can scrap moneycontrol websites and fetch the price of a few selected stocks for example (Infosys,
TataSteel) for both NSE and BSE at realtime and save it in a PDF.
Your task is to go through the Problem Statement, Requirements and create an Web Scraper clone for
Relevel.
Follow the standard naming conventions and comment on the code well, so that it is easily understandable.
We are looking for a basic working prototype so make your assumptions accordingly and pace yourself.
Pre-requisites
The candidate should make sure GIT, NodeJS and MongoDB are already installed on their system
before starting the development.
User Stories
Problem 1 (Estimated Time to complete ~2 Hours)
Story-2 (Scrap stocks price from website)
Your APIs should provide the following functionality to downstream consumers of the API (in a RESTful
way)
Scrap stock prices from website.
- Create an API endpoint “/arbitrage”
- Add appropriate request body to scrap NSE and BSE stock price.
- Validate the request. For example if the request has a valid email ID, the password is strong.
- Store information at the backend in proper tables.
- For success, return proper response codes.
- For failure, return proper response codes.
- Use an appropriate HTTP method out of GET, POST, PUT,PATCH,DELETE, etc.
Problem 1 (Estimated Time to complete ~1.5 Hours)
Story-4 (Download the prices in PDF format Functionality)
Your APIs should provide the following functionality to downstream consumers of the API (in a RESTful
way)
Download the prices in PDF format.
- Create an API endpoint “/download”
- It will save the values in PDF format and download it in local machine
- Validate the request. For example if the request has a valid email ID, the password is strong.
Assignment Questions
- Store information at the backend in proper tables.
- For success, return proper response codes.
- For failure, return proper response codes.
- Use an appropriate HTTP method out of GET, POST, PUT,PATCH,DELETE, etc.
Web Scraper
Practice Problems
Assignment Solutions
Assignment Solutions
Solution
https://github.com/Gtgstg/Web-Scrapper
User Stories
Problem 1 (Estimated Time to complete ~2 Hours)
Story-2 (Scrap stocks price from website)
Your APIs should provide the following functionality to downstream consumers of the API (in a RESTful
way)
Scrap stock prices from website.
- Create an API endpoint “/arbitrage”
- Add appropriate request body to scrap NSE and BSE stock price.
- Validate the request. For example if the request has a valid email ID, the password is strong.
- Store information at the backend in proper tables.
- For success, return proper response codes.
- For failure, return proper response codes.
- Use an appropriate HTTP method out of GET, POST, PUT,PATCH,DELETE, etc.
Problem 1 (Estimated Time to complete ~1.5 Hours)
Story-4 (Download the prices in PDF format Functionality)
Your APIs should provide the following functionality to downstream consumers of the API (in a RESTful
way)
Download the prices in PDF format.
- Create an API endpoint “/download”
- It will save the values in PDF format and download it in local machine
- Validate the request. For example if the request has a valid email ID, the password is strong.
- Store information at the backend in proper tables.
- For success, return proper response codes.
- For failure, return proper response codes.
- Use an appropriate HTTP method out of GET, POST, PUT,PATCH,DELETE, etc.