How to scrape unstructured data from a website? I am using “get text” activity but it is not showing anything in my excel sheet. Thanks for the help.
First try to print the output of Get Text activity and check whether it is giving any output or not.
It is giving output for one of many elements I am trying to get data from. But for rest of the elements, it is not taking any data. dal_1.xaml (24.7 KB)
dal_1.xlsx (9.5 KB) here is the xaml file and the excel file. It is working perfectly fine for the address part but it is not taking any value for restaurant website. Thanks for helping
If you have data in excel then read excel & use for each row get the data
There is no data in excel except names and url of the hotel. What i am trying to do is iterate through each url and scrape specific information from the page. But, when I use get text activity for scrapping address, it is taking the address but for rest of the elements, it is not taking anything as it is unstructured data. I have attached the respective files above. If you can take a look, it will be really grateful.
Get that url using for each
Then use open browser & take what you want
That much I have done but when I use open browser then only the “get text” activity is not functioning properly for me.
It may be due to dynamic selectors
I tried unchecking that too…
I’ll help you on this one
I have gone through your work flow. After going to each url and want to scrape Address, rest website, Contact no and Specialty right ?
Are you trying to write those scraped data result into excel file or what ?
Yes, I am trying to write that scraped data into excel file. And for the above part, you got everything right.
Can you try this revised .xaml file?
dal_1.xaml (24.8 KB)
If there are any issues, please don’t hesitate to ask for help.
Thanks and regards,
What I just did here was: I updated the selectors
Use Write Cell activity to write into excel file but you did not use that activity in your workflow.
it is showing an exception
Source: Get Text ‘ADDRESS’ (Get Text ‘ADDRESS’)
Message: Cannot find the UI element corresponding to this selector:
Exception Type: UiPath.Core.SelectorNotFoundException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: ----> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
use dynamic selector & try
wouldn’t “write range” work in the last section work as “readDT” datatable is taking the item for each row?
If not, then do I have to use “write cell” activity after each “assign” activity?
Hi @Nikhil_Khapre, it is better to do write cell on this one.