Skip to main content

A tool to scrape and download publicly available stock information. Currently supports Yahoo Finance data.

Project description

Finance Scrapers

A pypi package to scrape stock information from different finance sites. Currently supports Yahoo Finance.

Installation

To install, Download the PyPi package or,

pip install finance-scrapers

To upgrade to the latest version,

pip install --upgrade finance-scrapers

Usage

Scrape stock information and display to terminal:

from finance_scrapers import YahooFinance

# the tickers of the stocks you want to scrape
tickers = ['schb', 'googl', 'nflx']

# run the scraper
scraper = YahooFinance(tickers)
all_stock_info = scraper.scrape()

Scrape stock information and download to a file:

from finance_scrapers import YahooFinance

# the tickers of the stocks you want to scrape
tickers = ['schb', 'googl', 'nflx']

scraper = YahooFinance(tickers)

# download data
scraper.download_data("json", "sample.json", overwrite=False) # or,
scraper.download_data("markdown", "sample.md") # or,
scraper.download_data("csv", "sample.csv") # or,
scraper.download_data("excel", "sample.xlsx")

FAQs

Why are some of my stock info dictionaries returning empty?
This indicates that the stock provided does not actually exist. It could be the case that you made a typo, wrote the wrong ticker, etc. In the future, a feature will be added to allow you to re-enter a stock if it could not be found.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finance-scrapers-0.1.5.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

finance_scrapers-0.1.5-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page