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!
When we scrape information from websites, more often than not, we expect to extract data not only from the search result page (usually a listing page) but also from each product's detail page.
If you are not sure about how to achieve this purpose with Octoparse, you may want to check this tutorial: Scrape data from both listing and detail pages
However, in some cases, when the detail page cannot be opened in a new tab, Octoparse cannot go back to the listing page to scrape the next detail page. If we cannot locate a "return to the previous page" button on the detail pages, we'll have to separate the task into two parts. Otherwise, there will be blank duplicates after getting the first line of data.
This tutorial will show you how to deal with this issue with the new Go Back to the previous function in Octoparse.
To follow through with this tutorial, you may use the URL below:
NOTE: If you want to check whether your workflow works correctly, please download the OTD file for this case at the bottom of this page.
Suppose you have already set up a loop to click into the details page from the listing page.
To begin, you need to make sure that the current page in the Octoparse's browse is the details page but not the listing page.
Click the add step button to add a step in the workflow
Select Back to Previous Page in the dropdown menu
And a Back to Previous Page box will be presented in the workflow:
NOTE: To check if this step works properly, you can simply click on the Back to Previous Page box, which will redirect you automatically to the listing page. The new tab option for the click item needs to be unchecked.
Below is a sample data run from the local. Excel, CSV, HTML, and JSON formats are available for export.