Data Scraping - maxnumberofresults not working

When data scraping from a site, I used to use “maxnumberofresults” property successfully - when set to 0 it scraped everything, when set to an integer it returned only that number of results. For some reason this has stopped working now and I can’t get it to work anymore. No matter what I set max number of results to, it just scrapes everything. Is this a known issue?

Hi @pduffy

Please see if you have set max number somewhere else other than the data scrapping wizard.

Also if you are finding it difficult to get desired number of result you can have a work around applying a look which would give you desired number of pages scrapped meanwhile.

Can you attach a workflow?

Thanks,
Prankur

1 Like

Hi, sorry for the delay. I’m not sure if this was the cause but when I re-scraped and selected the first 2 links on the page (rather than the first and last), it worked. Now I just need to figure out if we can pass a UiElement as the next link selector instead of a string :slight_smile:
Thanks.

Hi, I’m facing the same problem. When I set the maxnumberofresults to 0, it scrapes everything. But when I set to any other integer>10, it just goes on until the end without stopping at that number. I tried @pduffy’s solution above but that did nt work either :frowning: Would anyone be able to help here?

Hi Rohit,

Welcome to the community! :grin: I don’t get this issue anymore. What version of UiPath are you using? Also, if you’re scraping from a website and you can send the link I’ll take a look here.

Cheers,
Paul.

Thanks Paul :slight_smile: I am using the community edition 2019.9.2. Which one are you using now?

Hi Rohit3,

I’m also using community edition. I just tried running a scrape on the web page you posted and saw the same issue… maybe the tools have this issue with some websites but not all.

A workaround could be to set the desired number of results as a variable and put the scrape activity into a while loop, scraping a single page at a time on each iteration and appending the extracted datatable to a master one. That was how I got around the issue when I encountered it in April.

1 Like

Thank you so much Paul :smiley: Really appreciate the help! If possible, would you be able to share the xaml file of the workaround you mentioned? Thank you so much in advance :smiley:

Sure, take a look at the attached file. It will scrape the first 10 pages (or whatever you set NumPages to). I used chrome browser, so change the selector if you need to.

Main.xaml (9.6 KB)

1 Like

Rohit3, did you get it working?

1 Like

Hi Paul, sorry for the delay in responding. Thanks a ton for sharing the xaml file
:slight_smile: It worked like a charm :smiley: You rock! Thank you once again :smiley: :smiley:

1 Like

Very welcome Rohit, glad it worked for you :+1:

1 Like

I am also facing the exact same issue.