I have an issue while using the Data Scraping tool to extract datatables from a website.
I have several datatables to extract from the web, but even with the smallest one (190 entries overall), the ExtractData method returns a null Datatable (NullReferenceException) only when I try to get the whole table (parsing only a limited number of entries, e.g. 150, works perfectly).
Does anyone know this issue and could help me out?
thanks for the recommendation. However, it is already enabled as “True”.
There seems to be something happening after processing the last element of the table, as UiPath takes a long time to get out of the activity after this.
Unfortunately, I cannot share any link to the website as it is sensitive information.
I already tried all of your suggestions, put the MaxNumberofResults option to 0 but the datatable is empty at the end of the process.
I am not sure I understand the sentence "Also make sure “Output” property of “ExtractData” is “ExtractDataTable” though, do you mean to make sure that the variable “DataTable” of type “InOutArgument” of the output property is retrieved?
Please find here a sample of my code, I removed all the sensitive information so it shouldn’t work but the ExtractData activity is the one that I used. When I hard-code the field MaxNumberofResults to the right size of the Table, everything works fine but as soon as I put 0 (for dynamic tables), it doesn’t seem to work anymore.
The only suggestion that comes to mind is to check the selector of the Extract Structured Data activity and modify it by adding or removing attributes and using wildcards. You can also try to make sure that when doing Data Scraping you select the first and last elements in the table (not the first and second). It would also be worth setting the MaxNumberOfResults property to a comfortably large number like 10000. I can only guess unfortunately.
Thank you for your suggestions. I actually tried to manipulate the selectors but it didn’t work.
My Data Scraping was good as well, I tested it several times. With regard to the MaxNumberOfResults property, I did try to put it at a large number but then it fails when encountering the end of the datatable on the website.
I found a way to circumvent the issue, not resolving it directly however and it is really annoying. Basically I do not use 0 as value for the MaxNumberofResults option.
There is a location on the webpage where the total number of entries is displayed, the selector associated with the element is not that good (it fails half the time to retrieve the value) but I found a way to get this number anyway by putting it inside a Try-catch and looping until it finds it.
Then I use this dynamic number as the MaxNumberOfResults and it works.
If any of you may have a clue about what is the inherent issue related to scraping my table - why does it fails when trying to read after the last element in the table, I would be glad to read it!
Ran into the same issue, scraping only worked when the exact number of items was specified on MaxNumberOfResults attribute. If I create the data table upfront (I used build data table) it works also without specifying a MaxNumberOfResults (or 0) - so thanks a lot @ehclarke! UIPath team: I consider this a bug (!)
Hi, I had the same issue and it seems to me that the reason is because the “NextLinkSelector” is not available in the end. For example we have 3pages of results, but you can select “Next Page” only on 1st and 2nd Page. On the last one usually there is no such option. So the selector does not work and it can mess with the scraping action.
The bug is fixed for me with use of limit the amount of results (<all) or set default value for output table variable to “New System.Data.DataTable”.
Superb suggestion. I was then able to found the issue as to why I was getting zero results for my scrape - I needed to modify the selector field in UiPath.core.Activities.ExtractData (created using the Data Scraping extract wizard).
i am also facing similar kind of issue. @mikednaylor can you please explain what is meant by this statement “my scrape - I needed to modify the selector field in UiPath.core.Activities.ExtractData (created using the Data Scraping extract wizard).”
So if your list is not dynamic (that is the no of count of items are fixed, you can Put that no of count in MaxNumberofResults instead of 0 or 100… I was facing the same issue and problem got fixed. Surely its a bug in 2018 version of studio.