Data scraping multiple pages: next page selector go forward and back issue

Hi all, i’m new here, and i’m new to rpa process field

I’m trying to scraping an online database from this site:
Link

by searching the information from zip postal code (from external .csv file), typing it on the site’s searching bar, and then scraping the records from the page’s result.

But i have an issue with the next page selector, because the robot go from page 1 to 2 to 1 and so one until I force quit it.

Someone have some tips for this issue, please ?

@Filippo_Peron

Hi

Can you please indicate the 2 page selector in next button selector (which is in datascrapping properties) or else you can make it as dynamic while observing first page and second page selector.

Hope this helps

Thanks
Aman

thank you @aman_sheik for te answer, but i’m a rookie. Can you be more specific please ? because i don’t understand what i need to do :scream::sob:

@Filippo_Peron

You can use below selector it will work

< Webctrl tag=‘A’ parentclass = ‘pagination-next’/>

Click on Extract Structured data activity (in properties panel (which is in right side)) you will get next link selector (inside that you can paste above selector)

Hope this helps
Thanks
Aman

@Filippo_Peron

For your reference :

Thanks
Aman sheik


:scream::scream::scream:

@Filippo_Peron

You directly copied and paste? If so, please again indicate the next button (from your website) uncheck the aaname from selected items.

And check the parentclass within unselected items (in the above image you can see)

Thanks
Aman

Ok, your solution work for a while, but, when the page arrive to the last one of the pages list, the process freeze.

Then i click on “ignore” button and the process go ahead with another zip postal code in the search bar, wich show me a new page with a new pages list with next page arrow, but now the issue’s show again.
I’ve attached the project here

thankyou again for the help and patience.

test_scraping.zip (575.0 KB)

if you check the code u are not extracting any data from the data extraction you are just switching from page 1 to page 2. and there is no condition mentioned here to stop switching to next page if the page end is reached.

Please remove any unused variables in your code.

Ok, now it works very well, thank you so much for your help.

Now, i want the process stop when the page end is reached or, if the zip postal code searched in the search bar don’t make result in the page (i notice that UiPath do it automatically after some secondo of timeout, but this cause wasting time).
How i can do this ? what i need to do ?
Many thanks again, you’re very help

ExtractDataTable is an empty datatable that you created and does not hold any data as you did not extract any data using data scraping. so the data scraping which you did needs to be modified. Please modify the workflow accordingly and let me know so that we can work on any other errors you are getting. attached is an example of how I extracted the data from the website you mentioned.DataExtraction.xaml (10.3 KB)

Please explain if you need anything else.