Skip to main content

AmazonProductScrapper

Project description

Amazon Product Scrapper (Version 2021.1.1)

To install this python package, run this in terminal : pip install AmazonProductScrapper

Check out the code here on GitHub.

GitHub Url : https://github.com/subhajit2001/AmazonProductScrapper

Check out the published python package here on PyPi.

PyPi Url : https://pypi.org/project/AmazonProductScrapper/

This package helps to extract product data for all the available products from a given keyword(E.g.: laptops, headphones etc.) This data is returned in the form of a pandas dataframe.

The package can be loaded as:

import AmazonProductScrapper as aps

Extract product data of all laptops which are available in realtime:

df = aps.load_Amazon_product_data(laptops)

df is a Pandas Dataframe. We can view the dataframe as:

print(df)

The maximum number of pages that can be loaded for a partcular keyword is 20 and that is the final limit.

The extracted pandas Dataframe contains the data about individual products:

  1. Product_Name (Product Name)

  2. Product_Price (Price shown for the product)

  3. Actual_Product_Price (Undiscounted Price)

  4. Product_Rating(5) (Product Rating)

  5. No._of_ratings (Total number of ratings given by customers)

  6. Link (Link of the respective product page)

For extraction of reviews for a particular product, take the url of the product and no of pages of reviews you want to fetch. Each page contains 10 reviews approximately and the max pages that can be fetched is 500.

df = aps.load_Amazon_product_review_data(https://www.amazon.in/Boat-BassHeads-900-Wired-Headphone/dp/B074ZF7PVZ/ref=sr_1_3?crid=UPDZLG5ER2D3&keywords=headphones&qid=1640276178&sprefix=headphone%2Caps%2C647&sr=8-3,500)

Provide 2 arguments to the function above, one is the url of the product and another is the number of pages to be loaded whose value has to be within 1 to 500.

print(df)

The pandas Dataframe contains the data about an individual products:

  1. Product (Product Name)

  2. Title (Title of the review given by the customer)

  3. Rating (Rating given by customer)

  4. Review (Review given by the customer)

External Base packages required for making this library: Requests, bs4, Pandas

Credits for progress bar:

Do review the project and don’t forget to give your valuable suggestions to me here at: subhajitsaha.formal@gmail.com

Do submit a pull request if you want to.

Developer: Subhajit Saha. This project is licensed under MIT License.

Copyright (c) 2021-22 Subhajit Saha

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AmazonProductScrapper-2021.1.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

AmazonProductScrapper-2021.1.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file AmazonProductScrapper-2021.1.1.tar.gz.

File metadata

  • Download URL: AmazonProductScrapper-2021.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for AmazonProductScrapper-2021.1.1.tar.gz
Algorithm Hash digest
SHA256 1aa5bdd76a9fa5c112bc8e7d4efa3e660dc447b17c10fe1f5fbd0ef01db2ce8d
MD5 841fed0f16841484219aefc61c5c96bb
BLAKE2b-256 57a7961c4fc1a7c3b4d5d62cf6499d662eb9b195cc71bed8238ddf71545e5139

See more details on using hashes here.

File details

Details for the file AmazonProductScrapper-2021.1.1-py3-none-any.whl.

File metadata

  • Download URL: AmazonProductScrapper-2021.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for AmazonProductScrapper-2021.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ccf369e753b341912f7f0a9db5e9ba9ba7cff1b509ee0c9a4d2a3abcc4b2edf9
MD5 ab7d193ef282f6f8022da2ad136263a4
BLAKE2b-256 4af1a1ef60c89bc0e892cbdf01361e489318be464865ca3985e17a7ba6f6c47a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page