Skip to content

Shopify Scraper package to extract all products from a Shopify site and return them in a Pandas dataframe.

Notifications You must be signed in to change notification settings

practical-data-science/ShopifyScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShopifyScraper

ShopifyScraper is a Python package that scrapes data from Shopify. Unlike a regular web scraper, that needs to visit every page on a site, this package fetches Shopify's publicly visible products.json file, allowing you to scrape an entire store inventory in seconds.

When the commands below are run, ShopifyScraper will extract the store inventory and save the products and product variants to Pandas dataframes, from where you can access or analyse the data or write it to CSV or database.

Installation

To install ShopifyScraper, run the following command:

pip3 install git+https://github.com/practical-data-science/ShopifyScraper.git

Usage

from shopify_scraper import scraper

url = "https://yourshopifydomain.com"

parents = scraper.get_products(url)
parents.to_csv('parents.csv', index=False)
print('Parents: ', len(parents))


children = scraper.get_variants(parents)
children.to_csv('children.csv', index=False)
print('Children: ', len(children))


images = scraper.get_images(parents)
images.to_csv('images.csv', index=False)
print('Images: ', len(images))

About

Shopify Scraper package to extract all products from a Shopify site and return them in a Pandas dataframe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages