Skip to content

pranavrbm/Amazon-review-scraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Amazon Review Scraper

Amazon Review Scraper is a simple and effective tool designed to extract user reviews from any Amazon product page. Built using Python and Jupyter Notebook, this project enables you to collect, analyze, and visualize customer feedback for research, sentiment analysis, market study, or personal reference.

Features

  • Scrape Reviews: Extract all available reviews from an Amazon product page.
  • Easy to Use: Just provide the product URL and run the notebook.
  • Customizable: Modify the number of reviews to scrape, or filter by review rating.
  • Output Options: Save scraped reviews to CSV, Excel, or display them directly in the notebook.
  • Suitable for Analysis: Use the collected data for sentiment analysis, word cloud generation, and other data science applications.

How It Works

  1. Input: You provide the Amazon product URL in the notebook.
  2. Scraping: The notebook uses requests and BeautifulSoup (or Selenium if required) to collect reviews from the product page.
  3. Data Extraction: Information such as review title, rating, date, reviewer name, and review text is extracted.
  4. Export or Visualize: All reviews are saved to a DataFrame, which you can export or analyze further.

Prerequisites

  • Python 3.x
  • Jupyter Notebook
  • Required Python libraries:
    • requests
    • BeautifulSoup4
    • pandas
    • (Optional) selenium

To install dependencies, run:

pip install requests beautifulsoup4 pandas selenium

Usage

  1. Clone the repository

    git clone https://github.com/pranavrbm/Amazon-review-scraping.git
    cd Amazon-review-scraping
  2. Open Jupyter Notebook

    jupyter notebook

    Open the provided notebook (e.g., amazon_review_scraper.ipynb).

  3. Enter the Amazon Product URL

    • Find the cell where you input the product URL.
    • Paste the desired Amazon product link.
  4. Run the Notebook

    • Execute all cells to start scraping.
    • Scraped reviews will be displayed in a table and optionally saved to a file.

Example

product_url = "https://www.amazon.com/dp/B09G9F5C1T"  # Example product

Run the notebook to extract reviews for this product.

Important Notes

  • Ethical Use: Scraping Amazon must comply with their terms of service. This tool is for educational and personal research purposes only.
  • Limitations: Amazon may block automated requests or change its HTML structure, which may require updates to the scraper.
  • Captcha/Blocks: For large-scale scraping, you may encounter captchas or blocks. Using Selenium or rotating proxies can help.
  • Localization: The script is designed for the .com domain but can be adapted for other Amazon country sites.

Customization

You can modify the notebook to:

  • Scrape more pages of reviews.
  • Filter reviews by star rating.
  • Perform sentiment analysis or generate word clouds.

License

This project is released under the MIT License.

Author

pranavrbm


Amazon Review Scraper helps you quickly collect and analyze customer feedback for any Amazon product. Perfect for research, marketing, or personal insight!

About

Scrap any amazon product review

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published