Skip to content

This project is a Python script designed to gather product reviews from a specified Amazon url and conduct statistical analysis on the gathered data.

Notifications You must be signed in to change notification settings

svarts/amazon-web-scraping

Repository files navigation

Amazon Reviews Scraper

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.

Requirements

  • Python 3.6 or higher
  • pip (Python package installer)

Setup

1. Clone the Repository

  • Clone this repository to your local machine:
git clone https://github.com/svarts/amazon-reviews-scraper.git
cd amazon-reviews-scraper

2. Create a Virtual Environment

  • Create a virtual environment to isolate dependencies:
python3 -m venv myenv

3. Activate the Virtual Environment

  • Activate the virtual environment:

On macOS/Linux:

source myenv/bin/activate

On Windows:

myenv\Scripts\activate

4. Install Dependencies

  • Install the required dependencies using requirements.txt:
pip install -r requirements.txt

5. Run the Script

Run the script to scrape Amazon reviews and perform analysis:

python amazon_reviews_scraper.py

or

python3 amazon_reviews_scraper.py

Create requirements.txt

  • To generate a requirements.txt file that lists all the dependencies, run the following command:
pip freeze > requirements.txt

Note

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.

License

This project is licensed under the MIT License.

About

This project is a Python script designed to gather product reviews from a specified Amazon url and conduct statistical analysis on the gathered data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published