In this guide, you will learn how to web scrape products from the Bath & Body Works website, or any other e-commerce website that has a “load more” button.

Begin by downloading and registering your free account with ParseHub!

Bath & Body Works, LLC. was founded in 1990 in Ohio as a soap, candle, fragrance, lotion and gift retail store. The company now owns over 1,900 stores around the world, and has an e-commerce presence as well, which we will be scraping products from. With this tutorial, you will also be able to scrape other bath, body and beauty product websites.

Since this website has a load more button, rather than a next page button, you will learn how to use ParseHub to scrape e-commerce pages that have load more buttons!

Let’s begin scraping products!

Step 1: Project Setup

  1. Firstly, open ParseHub and log in.
  2. Click “New Project” to start a new project.
  3. Enter the Bath & Body Works URL you wish to scrape from, we will be scraping all candles with this URL:
  4. Hold Shift and click the PLUS(+) button next to the page selection, and choose Extract.
  5. Rename this Extract to “listingValue”.
  6. In the contents simply put a “0”, this will be needed later.

Step 2: Selecting Products

  1. Begin by clicking the PLUS(+) button next to your page selection and choose “Select”.
  2. Hover over the first product’s container, and click and hold CTR/CMD+1 until the whole div is outlined.
  3. Redo this step for the next product’s container to train the algorithm.
  4. Rename this selection to “product” on the left, expand it and delete the “name” extraction.

Step 3: Additional Product Details

  1. Firstly, click the list icon next to your product selection to see the new entries command.
  2. Click the PLUS(+) icon next to it and choose “Relative Select”.
  3. Click the first product container and then its name.
  4. Rename this selection on the left to “name”.
  5. Redo these steps for the description and the price, you can expand them as well and delete the URLs if you do not need them.

Step 4: Removing Scraped Products

  1. Begin by holding shift and clicking the PLUS(+) button next to the product selection.
  2. Choose “Extract” and rename it to “remove”.
  3. Under the Extract drop-down, choose “Delete element from page”.
  4. Click shift again and click the PLUS(+) button next to your product selection.
  5. Choose “Extract” again and this time name it “listingValue”, just as we did in the setup.
  6. In the value, put a 1 this time, to notify ParseHub that we have extracted all the products on this page.

Step 5: Pagination

  1. Begin by holding shift and click the PLUS(+) button next to Select page.
  2. Choose “Conditional” and in the expression write listingValue, this will check if it’s 1, as in true, and will continue to load the next set of products!
  3. Click the PLUS(+) button next to conditional and choose “Select”.
  4. Click the Load More button to extract it, rename it to pagination.
  5. Expand it and delete the extraction.
  6. Click the PLUS(+) button next to pagination and choose “Click”.
  7. Choose “Yes” as this is going to a “new page”.
  8. Finally keep the number of pages as zero, to scrape every product available, and click “Repeat Current Template”.

Step 6: Begin Bath & Body Works Scraping

We have now successfully created a conditional variable, extracted all products, removed them to load more products, and set up our project to scrape every single product available. We are now ready to scrape on ParseHub’s servers!

Click the green “Get Data” button on the left pane. You can Test, Run or Schedule your scrape. We chose Run to scrape every candle available on the website!

Here is what your data should look like:

Need help scraping a specific website for free? Contact our live chat support!

Happy Scraping! 💻