This repository is created for the mathematical software class. This project is a Python script that scrapes Amazon product reviews scrapes reviews from a specified Amazon product URL and performs statistical analysis on the collected reviews.
- Python 3.6 or higher
- pip (Python package installer)
- Clone this repository to your local machine:
git clone https://github.com/svarts/amazon-reviews-scraper.git
cd amazon-reviews-scraper
- Create a virtual environment to isolate dependencies:
python3 -m venv myenv
- Activate the virtual environment:
On macOS/Linux:
source myenv/bin/activate
On Windows:
myenv\Scripts\activate
- Install the required dependencies using
requirements.txt
:
pip install -r requirements.txt
Run the script to scrape Amazon reviews and perform analysis:
python amazon_reviews_scraper.py
or
python3 amazon_reviews_scraper.py
- To generate a
requirements.txt
file that lists all the dependencies, run the following command:
pip freeze > requirements.txt
Do not include the myenv
directory in your GitHub repository. To prevent this, add myenv/
to your .gitignore
file.
Ensure ethical use of web scraping and comply with Amazon's terms of service.
This project is licensed under the MIT License.