Pagination, also known as paging, is dividing a document into discrete pages, either electronic or printed. Setting up pagination is crucial to getting plenty of data from multiple pages. Common ways of pagination include paging with a "Next" button, a "Load More" button, or an infinite scroll.

This tutorial will introduce how to deal with pagination with a "Next" button in Octoparse.

There are two ways to set up pagination with a "Next" button:

  1. Use the auto-detect algorithm to set it up

  2. Set up the pagination manually

To follow through the tutorial, you may use the link below:

https://www.amazon.com/s?k=sunglass&ref=nb_sb_noss_2


1) Use the auto-detect algorithm to set it up

  • Click the "Auto-detect web page data" on the Tips panel.

9.png
  • Click the "Check" button to inspect which button is identified as a "Next" button.

The button selected will be highlighted on the page.

10.png

If Octoparse fails to recognize the correct next page button, click "Edit" to select the next button manually.

__1.gif
  • Uncheck Add a page scroll and click Create workflow in the Tips panel, and you will see a workflow with pagination created.

11.png
  • Click Pagination and Click to paginate to see whether Octoparse can move to the next page.

If Octoparse can go to the next page, your pagination has been set up successfully.

__1.gif

2) Set up the pagination manually

You can create the pagination manually if the auto-detection does not find the next page button.

  • Click the Next button, choose Loop click next page in the Tips panel.

    111.png

Tip: If there is no "Loop click next page" option, you can select any option with "Loop click" to generate a pagination loop, like "Loop click single element," "Loop click single button," and "Loop click single link."

You may check whether the pagination works appropriately with the same step in method 1.

Did this answer your question?