Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 1.52 KB

README.md

File metadata and controls

63 lines (51 loc) · 1.52 KB

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.