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:

from finance_scrapers import YahooFinance

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

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

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']

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

# download data
Downloader.download_csv(data=scraper.all_stock_info, file_path='../samples/data.csv')
Downloader.download_excel(data=scraper.all_stock_info, file_path='../samples/data.xlsx')
Downloader.download_json(data=scraper.all_stock_info, file_path='../samples/data.json')
Downloader.download_md(data=scraper.all_stock_info, file_path='../samples/data.md')

Examples of these downloads can be found here


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-2.0.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

finance_scrapers-2.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file finance_scrapers-2.0.0.tar.gz.

File metadata

  • Download URL: finance_scrapers-2.0.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for finance_scrapers-2.0.0.tar.gz
Algorithm Hash digest
SHA256 620941ea6a3dc9d98d12a19dea80ab44c358a0136d74a23fe4990d570a723cf0
MD5 a2be499edab70f6ab01133f89d224e43
BLAKE2b-256 76016714f6f8474b7a991634572e71d3fa79e561841fc22ec73d102a21f536a4

See more details on using hashes here.

File details

Details for the file finance_scrapers-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for finance_scrapers-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fe9921fb15e06b01a0c9dc96c948aadc122bee402402d12c6b6134732c46979
MD5 38595ee4dc5af58b20bb48843a17dec0
BLAKE2b-256 496b678e26d4b8ac4431176f4db77bc43aa3fe5ccfc69b0af3385bc9ccf99c32

See more details on using hashes here.

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