![]() On the below two screenshots, you can see the “Next” button is located by an XPath auto-generated by Firebug plugin on the first page and the last page. Here we use an example to show you how to end the loop by XPath modification. If the issue cannot be resolved by setting up the loop ending condition, you may need to modify the XPath of the pagination loop. Click “Execution time reach”, pick a number as your loop execution times and click “OK” to save your configuration. Select the pagination loop firstly, and then open “End loop when” drop-down menu. So if you know the exact times of the pagination clicks, you can set up “End loop when” option to resolve the problem perfectly. If you would like to scrape the first 50 pages of data, you can set up 49 execution times of execution.) When you set up the "End Loop When" condition for pagination step, the pagination loop would stop when it reaches the execution times configured. The "End Loop When" option allows you to stop the pagination at a specific page. Set up loop ending condition - "End Loop When" Here we offer two solutions for you to fix this issue - You can set up “End loop when” condition under “Advanced Options” of the pagination loop item, or modify XPath to prevent an endless loop.ġ. This may cause by the endless loop of pagination due to the "Next" button can still be detected on the last page. Go to have a check now!Įxtracting data from multiple pages through pagination is a very common case since most of the time you need more than one page of data for your project.īut you might find that Octoparse sometimes keeps scraping the last page and never stops. The latest version for this tutorial is available here.
0 Comments
Leave a Reply. |