Skip to main content

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


Release files for finance-scrapers 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finance-scrapers 2.0.0
File Size Uploaded
finance_scrapers-2.0.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for finance-scrapers 2.0.0
File Interpreter ABI Platform
finance_scrapers-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / finance_scrapers-2.0.0.tar.gz

Download URL finance_scrapers-2.0.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
620941ea6a3dc9d98d12a19dea80ab44c358a0136d74a23fe4990d570a723cf0
BLAKE2b-256 checksum
How to use checksums
76016714f6f8474b7a991634572e71d3fa79e561841fc22ec73d102a21f536a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / finance_scrapers-2.0.0-py3-none-any.whl

Download URL finance_scrapers-2.0.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fe9921fb15e06b01a0c9dc96c948aadc122bee402402d12c6b6134732c46979
BLAKE2b-256 checksum
How to use checksums
496b678e26d4b8ac4431176f4db77bc43aa3fe5ccfc69b0af3385bc9ccf99c32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

0.1.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page