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. (Related 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 add a Back to previous page action. 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 Back to the previous page feature in Octoparse.
To follow through with this tutorial, you may use the URL below:
If you want to check whether your workflow works correctly, please click here to download the sample task.
Suppose you have already set up a loop to click into the details page from the listing page.
Select Click Item to enter the details page
Click the add step button to add a step in the workflow
Select Back to Previous Page in the dropdown menu
Then 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.
Leave the Open in a new tab option for the click item unchecked.