Financial-Info-Extractor icon indicating copy to clipboard operation
Financial-Info-Extractor copied to clipboard

Extract financial information in CSV format for companies compliant to the NSE

Finance Information Extractor

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.

Following information is extracted for the company

  • Balance Sheet
  • Cashflow
  • Quarterly Earnings
  • Half Earnings
  • Key-Ratio
  • Profit-Loss
(In Consolidated and Standalone type)
(All the data is scraped and stored in .csv format)

Dependencies and Tools

Steps Involved

  • 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

Else download manually here:

Run the scripts:

Add the path to the Browser Driver in the in the url-extractor script.

$ python url-extractor.py
$ python extract.py

License

The MIT License (MIT)

Copyright (c) 2018 Chaitanya Rahalkar