Code Monkey home page Code Monkey logo

yahoo-finance-scrapper's Introduction

yahoo-finance-scrapper

Scripts to download fundamental data on stocks from Yahoo Finance webpage.

Contents

In the functions file there're functions to download fundamental data from Yahoo Finance webpage. The download script is only a caller with a simple command line interface.

The functions are:

  • balance: newest data on balance sheet page
  • balance_allyears: all available years
  • financials: newest data on financials page
  • financials_allyears: all available years
  • cashflow: newest data on cashflow page
  • cashflow_allyears: all available years
  • keystats: data from keystats page
  • download_newest: wrapper that calls functions to download only newest data on stock
    Disclaimer: using the download.py to download many stocks can take while since it'll run a chrome instance for each stock.

Requirements

Python 3.8
BeautifulSoup4 4.9.1
Numpy 1.19.1
Pandas 1.1.0
Requests 2.24.0
Selenium 3.141.0
Google Chrome
Chrome webdriver (matching your OS and chrome version)

How to use it

There're several ways to use:

  • You can copy the functions script to your repository and import it.
  • Use the download script.

The most important part is to download the chrome webdriver from this page: https://chromedriver.chromium.org/downloads

Unzip the driver inside your repo and name it as 'chromedriver'. It's important that the driver match your operational system and your Chrome version.

The chromedriver listed inside this repository probably will not match yours, so do your work.

To do

  • Implement option to run with firefox webdriver
  • Add a docker image to run the download.py in a container

yahoo-finance-scrapper's People

Contributors

gcontarini avatar

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.