This is a python script that allows one to extract financial data for any company from Religare(India's leading diversified financial services group). This is written compliant only to the Indian National Stock Exchange since no official API provides this information for the Indian stock market. This script downloads the financial data for the top 500 NSE companies. This is an information scraper written with the Beautiful Soup package for Python.
- Balance Sheet
- Cashflow
- Quarterly Earnings
- Half Earnings
- Key-Ratio
- Profit-Loss
- Beautiful Soup - For HTML/XML Parsing
- Requests - Python HTTP Library
- Selenium - Browser automation library
- CSV - For manipulating CSVs
- PhantomJS - Headless browser for automation
- Extraction of the URLs for each company using browser automation. PhantomJS(Headless Browser) is being used for the browser automation part. (Any other browser can also be used)
- Scraping the data from each URL and storing in CSVs.
Install the dependencies and run the scripts.
Install Beautiful Soup 4,Selenium and Requests using pip.
$ pip install bs4
$ pip install requests
$ pip install selenium
Add the path to the Browser Driver in the in the url-extractor script.
$ python url-extractor.py
$ python extract.py
The MIT License (MIT)
Copyright (c) 2018 Chaitanya Rahalkar