Lowe’s is the second-largest home-improvement retailer in the United States, right next to Home Depot. Lowe’s has over 2,000 locations in USA and Canada and over 300,000 employees. On Lowe’s website, you can find a variety of products from appliances, plumbing, power tools and more. In this blog post, we will show you how to scrape Lowe’s products using ParseHub!
To follow along with this tutorial, we suggest you download ParseHub for free.
Let’s Begin Scraping Lowe’s Products
- To begin, make sure you have ParseHub installed on your computer. ParseHub supports Mac, Windows and Linux. Once you register for free and log in, click “New Project” to start a new scraping project.
- You may now enter the URL of the Lowe’s page you want to scrape. We will be scraping “French Door” refrigerators using this URL: https://www.lowes.com/pl/French-door-refrigerators-Refrigerators-Appliances/4294857963
- The page and products should now load on the ParseHub browser on the right.
- Click the first product’s title and it should turn green. Click the next product’s title which is yellow to select all products. Note that you might need to click some more product titles to train the algorithm.
- Rename this selection on the left to ‘fridge’.
- On the live preview pane in ParseHub you should now see all the product titles.
Obtaining More Product Information
To get more information from each product, we will need to use the relative select tool on ParseHub:
- Begin by clicking the PLUS(+) button next to the ‘fridge’ selection.
- Click ‘Relative Select’ and click the first product’s title as we did before.
- Move the cursor to the respective brand name, you should see an arrow.
- Click the brand name and it should turn green. Repeat this step for the next few products to train the algorithm. Rename this selection to ‘brand’.
- Now you should have extracted all the brands for each fridge. Expand the selection and remove the brand’s URL, as it goes to the same URL as the fridge name.
To scrape the prices of the fridges, you need to also use the relative select. However, since the prices have smaller dollar signs and decimals, it is trickier than just clicking the price. Follow these steps to extract the price:
- Firstly, click the PLUS(+) button next to the fridge selection as we did before.
- Click the ‘Relative Select’ command and click the first fridge’s title.
- An arrow should appear, hover over the price, and you should see it only selects the price, not the dollar sign or decimals.
- Hold Ctrl+1/Command+1 on Mac to zoom out and capture the whole price.
- Finally, you can click to extract it and rename it to “price”
Once again, scraping additional information from each respective product is done with Relative Select. However, with ratings such as the stars on Lowe’s website, there is an additional step.
- Firstly, follow the “Relative Select” steps we used to get the brand and price.
- Zoom in this time using Ctr+2 or Cmd+2 and click the full rating block.
- Rename this selection to “rating”.
- In the data preview, you will notice it only gets the number of ratings, not the rating itself.
- Click the expand button on the rating selection.
- Click the “Extract rating’ command and below you should see extraction settings.
- On the “Extract” drop-down, choose “aria-label Attribute”
- Now in the live preview, you should see the star ratings, such as “4 Stars”.
Scraping Additional Pages
To extract products from the next page(s), you need to add pagination to your ParseHub project. Pagination allows ParseHub to scrape a set number of pages; or unlimited which will get every product in that category.
To begin pagination, follow these steps:
- Click the PLUS(+) button next to the ‘page’ selection and choose the select command.
- Click the next page symbol on the embedded browser, at the footer of the page.
- Rename this selection to ‘pagination’.
- Expand the pagination selection and remove the 2 attributes, they are not needed and will add unwanted columns to your data.
- Now you can click the PLUS(+) button next to your pagination selection and choose the ‘click’ command.
- Finally, a popup will appear asking if this is a next page link, click “yes” and choose the additional amount of pages you want to scrape. If you leave the amount to zero, all the product pages available will be scraped! For our example, we put 2 which means 3 pages in total.
Enabling IP Rotation (Paid Plan)
At the time of this blog post, scraping from Lowe’s requires IP Rotation. If you are not using the paid version of ParseHub, you may get an empty result which means you have been blocked from scraping. ParseHub rotates through residential proxies, which allows the bypassing of any blocks.
To enable IP Rotation, click the cog at the top left of ParseHub. Now click “Settings” and you should see the “Rotate IP Addresses” check box. Tick this check box to enable IP Rotation. You are now ready to scrape products from Lowe’s!
Note that in our scrape it took a few attempts to get results from the three pages. You can contact our support team if you require scraping assistance.
Starting your Scrape Project
Now that you set up your select, relative selects and pagination, it is time to begin our scraping!
To begin scraping, click the green “Get Data” button on the left pane. You can now Test, Run or Schedule your scrape, we are going to click Run to start the scraping process just once.
Once your scrape is complete, you will be able to save it as a CSV or JSON. You can also connect to the ParseHub API to build web applications. You have now successfully scraped Lowe’s products and website!
Thank you for reading our Lowe’s scraping tutorial, we hope you enjoyed following along!
If you have any questions about web scraping or need help with extracting data, feel free to contact us or shoot us a chat.
Happy Scraping! 📊