Giter Site home page Giter Site logo

surya-murali / web-scraping-and-amazon-reviews-analysis Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 10.0 1.91 MB

A Web Scraping project to analyze product reviews in Amazon.com. A sentiment analysis is done and the reviews are sorted and highlighted in green or red based on the sentiment score.

Home Page: https://github.com/Surya-Murali/Web-Scraping-and-Amazon-Reviews-Analysis

R 86.01% HTML 13.99%
amazon review sentiment-scores sentiment-polarity amazon-reviews-analysis webscraping

web-scraping-and-amazon-reviews-analysis's Introduction

Web-Scraping-and-Amazon-Reviews-Analysis

This is a Web Scraping project to analyze product reviews in Amazon.com. Once you provide the Product ID and the number of pages of reviews you want to scrape, the best and the worst reviews are identified based on their sentiment scores. They are highlighted in green and red (for positive and negative reviews respectively) and shown in an HTML format. The mean rating for the product and the overall average sentiment score of the product is also revealed.

Before you buy any product on Amazon, get the Product ID and run this code to find out the reviews that would actually interest you! :D

The code can be found here.

Note :

  • The Product ID can be taken from Amazon's URL
  • This project becomes extremely useful if the product has 30+ reviews which is more than likely for most products
  • The Outputs would look something like this!

web-scraping-and-amazon-reviews-analysis's People

Contributors

surya-murali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

web-scraping-and-amazon-reviews-analysis's Issues

Error in data.frame

Hey all,

first of all: Thank you for the development of this crawler! It should be a great help for my studies!

However, I get an error message when ultimately running the amazon_scraper command:

reviews <- amazon_scraper(doc, reviewer = F, delay = 2) #here comes the error message
#Hide Traceback

#Rerun with Debug
#Error in data.frame(title, author, date, ver.purchase, format, stars, :

arguments imply differing number of rows: 10, 0

3.

stop(gettextf("arguments imply differing number of rows: %s",

paste(unique(nrows), collapse = ", ")), domain = NA)

2.

data.frame(title, author, date, ver.purchase, format, stars,

comments, helpful, stringsAsFactors = F) at amazonscraper.R#57

1.

amazon_scraper(doc, reviewer = F, delay = 2)

Does somebody have a clue what the reason could be? I attach my script & environment, thank you!

Script_AmazonScraper.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.