A web scraper for different market data and news from https://stockanalysis.com/
Project description
Stock Analysis Scraper
This project is a Python-based web scraper designed to extract relevant stock information from the Stock Analysis website. It utilizes BeautifulSoup
to parse HTML content and extract specific data points, such as market capitalization, revenue, industry, sector, and more. Additionally, it can extract pre-market gainers, after-hours gainers, and all news articles related to stocks.
Features
- Extracts stock information including:
- Market Capitalization
- Revenue (TTM)
- Net Income (TTM)
- Shares Outstanding
- EPS (TTM)
- P/E Ratio
- Dividend Information
- Extracts profile details such as:
- Industry
- Sector
- IPO Date
- Number of Employees
- Stock Exchange
- Ticker Symbol
- Extracts lists of:
- Pre-Market Gainers: Stocks with the highest gains during pre-market trading.
- After-Hours Gainers: Stocks with the highest gains during after-hours trading.
- All News: Recent news articles related to the stock market and specific stocks.
- Outputs the extracted data as a dictionary for easy integration with other applications or storage solutions.
Prerequisites
Before running the scraper, ensure you have the following installed:
- Python 3.6+
BeautifulSoup4
lxml
(optional but recommended for faster HTML parsing)
You can install the required Python packages using pip
:
pip install beautifulsoup4 lxml
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
Built Distribution
File details
Details for the file stockanalysis_scraper-1.0.0.tar.gz
.
File metadata
- Download URL: stockanalysis_scraper-1.0.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a42691239f4703b7922bdce9cc99df860c6d226aae2b8f735f2881a267269922 |
|
MD5 | cc2747970a97a41c7234f927a2d367b0 |
|
BLAKE2b-256 | 444ae223f499ec313ec770a8d8b3068b27988ea7c89d469505adbea145a82b98 |
File details
Details for the file stockanalysis_scraper-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: stockanalysis_scraper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fecd4632d98518e64727ac208c8b9c58e145fe0ecacdca2a5ce8c8a250e2219 |
|
MD5 | fd978d53808c20a31f1a504f0dd94784 |
|
BLAKE2b-256 | 20325d1bfb11985cedf5580af12a336f6bdbe1f97a8d57391b3e97ea03b07c87 |