Code Monkey home page Code Monkey logo

financial-info-extractor's Introduction

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

financial-info-extractor's People

Contributors

chaitanyarahalkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

financial-info-extractor's Issues

No longer works

It seems this no longer works. I am getting below error.

D:\Documents\fin\fin>python url-extractor.py

DevTools listening on ws://127.0.0.1:58808/devtools/browser/f77f88a5-3821-4801-a617-9af0265ddaa5
D:\Documents\fin\fin\url-extractor.py:27: DeprecationWarning: find_element_by_* commands are deprecated. Please use find_element() instead
driver.find_element_by_id(search_id).clear()
[21404:21880:0411/194314.319:ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is disabled, ANGLE is
[18180:21468:0411/194414.261:ERROR:device_event_log_impl.cc(214)] [19:44:14.261] USB: usb_service_win.cc:391 Could not read device interface GUIDs: The system cannot find the file specified. (0x2)
[18180:21468:0411/194414.268:ERROR:device_event_log_impl.cc(214)] [19:44:14.268] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[18180:21468:0411/194414.269:ERROR:device_event_log_impl.cc(214)] [19:44:14.270] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)

D:\Documents\fin\fin>python extract.py
Traceback (most recent call last):
File "D:\Documents\fin\fin\extract.py", line 23, in
company = temp[4]
IndexError: list index out of range

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.