Tripcentral.ca is one of the largest travel agencies in Ontario, and employs over 100 travel experts that have actually travelled to the destinations. Tripcentral finds the best prices for all-inclusive vacations, flights, cruises, hotels and more! Tripcentral’s website hosts a lot of prices and information for each travel destination, which makes it a great resource to scrape. If your website or app requires up-to-date travel prices and information, Tripcentral is one of the best websites to scrape from. Their prices are presented in a grid format which makes them very easy to scrape, compared to some other travel websites.

Let’s get started! To begin scraping Tripcentral, make sure you sign up and download ParseHub for free.

Making Your First Selection

  1. Begin by logging into ParseHub on your PC, Mac or Linux system.
  2. Once ParseHub loads, click the “New Project” button to start your project
  3. You may now enter any Tripcentral URL you want to scrape from, we will be scraping this URL to scrape vacations departing from Toronto: https://www.tripcentral.ca/vacationgrid/index.php?params=0,0,0,0,2,1,0,0,0,11101,0,1,0,0,3,0,1,0-0-0,0,0,50,0,0,0,0,0,0,0,1,1,0,0,0&numberOfAdults=2&htd=1&numberOfRooms=1&lang=EN
  4. You may now click on the first resort to extract it.
  5. The rest of the resorts will now turn yellow, click the next one to train the ParseHub algorithm.
  6. You have now made your first selection! Rename this selection to “resort”

Relative Select

To extract each resort’s city and country, we need to use the Relative Select tool to get each resort’s respective location:

  1. First, click the PLUS(+) on the resort selection we did earlier.
  2. Now click the first resort again, and an arrow should appear.
  3. Point and click the respective location, which is on the left of the resort column.
  4. Redo this step for the next resort to train the algorithm.
  5. All 50 resorts on the first page and their respective locations should now be selected.
  6. Rename this selection to “location”.

Extracting Prices From Resort Pages

If we want to get additional information from each resort, we need to parse into each of the resorts we extracted. We can do this by clicking on each resort page and following a new set of selections using a new template:

  1. Begin by clicking the PLUS(+) button next to the resort selection we made earlier.
  2. Now choose the Click command, which will click into each resort selection.
  3. On the popup, choose No, as this is not a next page button.
  4. Create a new template called “resort_info”.
  5. You may now make your first selection on this template, by clicking the first date.
  6. Click the second date to train the algorithm, and rename this selection to “date”.
  7. You can now do a relative select on the date extraction by clicking the PLUS(+) button
  8. Click on the first date and then the first date’s price
  9. Redo this for the second date and price, and rename this selection to “price”.
  10. Repeat these steps for other information, such as the Room Type and Meal Plan.

Adding Pagination

If we started the project right now, we would only scrape 50 vacations on the first page. To scrape the rest of the pages, we need to add pagination to our project:

  1. Next to the “page” element, click the PLUS(+) button.
  2. Choose “Select” and click the “Next” button at bottom of the Tripcentral pricing grid.
  3. Rename this selection to “pagination” and remove the extracted attribute by expanding the selection.
  4. Now click the PLUS(+) button on your “pagination” selection and choose “Click”.
  5. The next page popup will appear, this time click “Yes” as we are trying to go to the next page.
  6. Finally, enter the number of extra pages you want to scrape, we will choose 1, which means 2 pages in total.

Bypassing IP Blocks

From our 2-page scraping example, we did not require any IP Rotation. However, it is possible to get blocked from scraping Tripcentral’s website depending on how many pages you’re parsing through. If that is the case, you can go to the settings of your project and tick the IP Rotation checkbox. Note that this is a paid feature of ParseHub.

Start Scraping

You are now ready to begin scraping! To start your scrape, click the “Get Data” button on the left, or click the settings cog at the top and choose “Get Data”.

You may now Test, Run or Schedule your Tripcentral scrape. As a travel company, you may want to get updated prices using the Schedule feature, however, for our example, we will run the scrape once using the “Run” button.

Great job! If you followed the tutorial your data should look something like this:

If you have any questions about web scraping, extracting vacation data or anything else, feel free to contact our live support on our website. We are experts on web scraping and will help you every step of the way.

Happy Scraping! 📊