Skip to content

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

License

Notifications You must be signed in to change notification settings

gcontarini/yahoo-finance-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages