You are browsing a tutorial guide for the latest Octoparse version. If you are running an older version of Octoparse, we strongly recommend you upgrade because it is faster, easier and more robust! Download and upgrade here if you haven't already done so!

Canadian Tire is a Canadian retail company that operates in the automotive, hardware, sports, leisure and housewares sectors.

In this tutorial, we will show you how to collect product information on canadiantire.com with Octoparse.

1.png

To follow through, you may want to use this URL:

https://www.canadiantire.ca/en/automotive/tires-wheels/tires.html?adlocation=LOL_TiresSCLP_MegaNavAuto_19309_enhttps://www.canadiantire.ca/en/search-results.html?q=bulb

Here are the main steps in this tutorial: [Download task file here]

  1. Create go to web page - to open the target page

  2. Auto-detect the web page - to create workflow

  3. Modify data fields - to add custom data fields and locate elements accurately

  4. Add pagination - to scrape further pages

  5. Set page scroll - to fully load images

  6. Run the task - to get your target data


1. Create go to web page - to open the target page

  • Enter the URL on the home page and click Start

mceclip0.png

Tip: If you see any pop-ups on the web page, please switch to Browse mode to close it manually. Remember to turn off Browse mode after you close the pop-up.


2. Auto-detect the web page - to create the workflow

  • Click on Auto-detect web page data and wait for the detection to complete

2.png
  • Delete unwanted fields in Data Preview panel

fields.png
  • Untick Add a page scroll and Click Create workflow

Untick_page_scroll.png

The workflow would look below:

workflow.jpg

3. Modify data fields - to add custom data fields and locate elements accurately

In this case, the price per tire failed to be detected. We need to manually add a custom field for the price.

  • Click the price of one tire

  • Click Extract text of the selected element in the tip box after it turns green

custom.png
  • Double click on the data field to rename it as well as other fields

RENAME.png

Modify XPath for price per tire and set of 4 as below:

  • Turn the data preview panel into a vertical view

  • Input Xpath:

    • //div[@class="nl-price--charge"]//span[contains(text(),'Each')]/.. for per_tire field

    • //div[@class="nl-product-card-vehicle--set-of-four__product-information"]//span[@data-testid="priceTotal"] for set_of_4 filed

INPUT.png

4. Add pagination - to scrape further pages

  • Click the next page button

  • Click Loop click single button in the tip box after the button turns green

PAGINATE.png

5. Set page scroll- to fully load images

  • Click Go to Web Page

  • Click Options

  • Tick Scroll down the page after it is loaded

  • Select Scroll for one screen

  • Wait 2s

  • Scroll 50times

  • Click Apply

SCROLL.png
  • Click Click to paginate in the workflow

  • Click Options

  • Tick Scroll down the page after it is loaded

  • Select Scroll for one screen

  • Wait 2s

  • Scroll 50times

  • Click Apply

CLICK_TO.png

The final workflow should look below:

wf.png

6. Run the task - to get your target data

  • Click the Save button first to save all the settings you have made

  • Then click Run to run your task either locally or cloudly

  • Select Run on your device and click Run Now to run the task on your local device

  • Wait for the task to complete

Below is a sample data run from the local. Excel, CSV, HTML, and JSON formats are available for export.

data.png
Did this answer your question?