The Brick is one of Canada’s leading home, furniture, mattress and appliance retailers. Founded in 1971 by three brothers in Alberta, The Brick has grown to over 136 retail stores spanning all provinces except Nunavut. It has since been acquired in 2012 by Leon’s, its current parent company for $700 million dollars. In this guide, we will show you how to scrape The Brick and their home products with our free web scraping tool, ParseHub.
In order to follow along, register and sign up to ParseHub for free.
Let’s scrape The Brick!
- Begin by opening ParseHub on your PC, Mac or Linux system.
- Create a new project by clicking the “New Project” button
- Enter the URL you wish to scrape from, we will scrape accent chairs using this URL: https://www.thebrick.com/collections/furniture-living-room-accent-chairs
- Click the first product’s name to extract it. The rest of the product names will turn yellow.
- Now click the next chair’s name to train the algorithm.
- All 48 products on the first page will now be extracted!
- Rename the selection on the left to “chair”.
When scraping relative data for each extraction, we need to use the Relative Select tool:
- Firstly, click the PLUS(+) icon next to the “chair” selection.
- Choose “Relative Select” and click the first product’s name again.
- An arrow will appear, click the first product’s price to extract it relatively.
- All prices will now be extracted!
- Rename this selection on the left to “price”.
Note: If you want to remove the “From” text before the price, you will need to add this simple regular expression to the price extraction: ([0-9,.]+)
Scraping Multiple Pages
Running the scrape at this point will only get us 48 rows of data. To scrape multiple pages, we need to use ParseHub’s pagination.
- Firstly, scroll past all the products until you see the next page button.
- Click the PLUS(+) button next to the “page” selection.
- Choose “Select” and click the next page button to extract it.
- Rename the selection to “pagination”.
- Expand the data and delete the two extractions.
- Click the PLUS(+) icon next to your “pagination” selection and choose “Click”.
- Choose “Yes” as this is a next page button.
- Finally, choose the number of additional pages you wish to scrape, we will choose 2, which is 3 pages in total, and should get us 144 rows of data!
Now that you have your selections, relative select and pagination set up, you are ready to scrape! Firstly, click the “Get Data” button on the left pane, or you can also click the settings drop-down at the top to click “Get Data”. You may now choose to Test, Run or Schedule your scrape. You can run your scrape first, then choose to Test if you run into any issues. Scheduling is useful when you require up-to-date data.
In our example, we chose Run and got three pages of results:
If you need help with scraping The Brick, or any website, feel free to reach out to our amazing support team!
Happy Scraping! 🛋️