E-Commerce Scraper
Create an instance of the PyScrappy library to interact
with the class ECommerceScraper
Helps in scrapping data from E-Commerce websites
1. Alibaba2. Flipkart3. Snapdeal
#
Typeclass
#
NoteCreate an object of this class to procced further.
obj = PyScrappy.ECommerceScrapper()
#
Flipkartflipkart_scrapper()
#Helps in scraping data from Flikart ('Name', 'Price', 'Original Price', 'Description', 'Rating').
#
Return typepandas.DataFrame
#
Parametersproduct_name
: Enter the name of the desired product, which you want to scrape the data of
Type: strn_pages
: Enter the number of pages that you want to scrape
Type: int#
NoteBoth the arguments are a compulsion. If
n_pages == 0:
A prompt will ask you to enter a valid page number and the scrapper will re-run.obj = PyScrappy.ECommerceScrapper()obj.flipkart_scrapper(product_name, n_pages)
#
Snapdealsnapdeal_scrapper()
#Helps in scraping data from Snapdeal ('Name', 'Price', 'Original Price', 'Number of Ratings').
#
Return typepandas.DataFrame
#
Parametersproduct_name
: Enter the name of the desired product, which you want to scrape the data of
Type: strn_pages
: Enter the number of pages that you want to scrape
Type: int#
NoteBoth the arguments are a compulsion. If
n_pages == 0:
A prompt will ask you to enter a valid page number and the scrapper will re-run.obj = PyScrappy.ECommerceScrapper()obj.snapdeal_scrapper(product_name, n_pages)
#
Alibabaalibaba_scrapper()
#Helps in scraping data from Alibaba ('Name', 'Number of Items', 'Description', 'Ratings').
#
Return typepandas.DataFrame
#
Parametersproduct_name
: Enter the name of desired product
Type: strn_pages
: Enter the number of pages that you want to scrape
Type: int#
NoteBoth the arguments are a compulsion. If
n_pages == 0:
A prompt will ask you to enter a valid page number and the scrapper will re-run.obj = PyScrappy.ECommerceScrapper()obj.alibaba_scrapper(product_name, n_pages)