I need some help with extracting data from Youtube Playlists

I made an automation that converts Youtube playlists into mp3s. I screen recorded the first part of extracting the data from the playlist. Everything works good,but if I try another playlist other than the original it stops working. I tried changing from the selector "ht ml app=‘chrome.exe’ title=‘Samples :slight_smile: - YouTube’ /> " (original playlist) into html app=‘chrome.exe’ title=’*’ /> ,but it still does not work. Does anyone know how I can solve this ? I want it to work for any link I type.

Hi!

can we compare one playlist selectors with other play list selectors?

and also mention the error!

Regards,
NaNi

Hello. The idea is that you manually type in the link of the playlist you want to download. When I created the project,I’ve done it with the “Samples” playlist,but now I want the program to download any playlist you give it, so I changed the selector title to “*” hoping this would make it work for any playlist.

This is the error :

" RemoteException wrapping UiPath.Core.SelectorNotFoundException: Could not find the UI element corresponding to this selector:
<html app='chrome.exe' title=' * '/>

The closest matches found are:
[50%] <html app='chrome.exe' title='WhatsApp'/>
[50%] <html app='chrome.exe' title='RPA Projects - Google Sheets'/>
[50%] <html app='chrome.exe' title='uipath scraping youtube playlist links - YouTube'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/>
[50%] <html app='chrome.exe' title='how to scrape youtube playlist uipath - Google Search'/>
[50%] <html app='chrome.exe' title='I need some help with extracting data from Youtube Playlists - Help / Studio - UiPath Community Forum'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/>  ---> RemoteException wrapping System.Runtime.InteropServices.COMException: Could not find the UI element corresponding to this selector:
<html app='chrome.exe' title=' * '/>

The closest matches found are:
[50%] <html app='chrome.exe' title='WhatsApp'/>
[50%] <html app='chrome.exe' title='RPA Projects - Google Sheets'/>
[50%] <html app='chrome.exe' title='uipath scraping youtube playlist links - YouTube'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/>
[50%] <html app='chrome.exe' title='how to scrape youtube playlist uipath - Google Search'/>
[50%] <html app='chrome.exe' title='I need some help with extracting data from Youtube Playlists - Help / Studio - UiPath Community Forum'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/>
[50%] <html app='chrome.exe' title='Samples :) - YouTube'/> 
   at UiPath.UiBrowserClass.Find(String bstrSelector)
   at UiPath.Core.Browser.Find(Selector selector, IPlaceholderResolver placeholderResolver)
	--- End of inner exception 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) "

Hi!

by keeping * in title it won’t work for all the playlists that you wants to download. the robot will open the chrome because the app name is Chrome. when you make title as * the robot won’t know what to do in chrome.

instead of making entire selector dynamic use like this title=’*-Youtube’

This may work! and also check the next activity selectors because that may contains previous playlist id’s.

Regards,
NaNi

Hi ! I’ve realised that i wrote it the wrong way and changed it to “* - Youtube” ,however it still does not work…


This is the first part of the workflow. I think the problem is with the extraction of the data part. This is what its selector looks like,but I don’t know what to change :

Hi!

Open it with UiExplorer so that we may have more options to make dynamic!

we can also remove attach browser! just drag the extracted structured data activity inside the browser then remove the attached window.

Regards,
NaNi

I am not sure I understand. I opened UiExplorer but I dont understand what I should do with it.

@Nostradamon1,

In the title tag, can you replace the value with this - '* - Youtube'.
I think you need to have space on both sides of ‘-’, like the below screenshot.

image

Try this, and let me know if you’re able to perform.

Thanks,
@90s_Developer

Hello again ! :smiley: it still does not work,and I think the problem is related to the ExtractData. I tried recording it again but it still does not work. This is the ExtractData selector :

Hi!

uncheck the cls and try to validate!

Regards,
NaNi

Click here please:
image

And then show us :slight_smile:


I m not sure if this is what you wanted to see.

I did this,and the validation worked,but the automation does not. It does not even give any errors,it just stops.

Main.xaml (26.9 KB)
This is the file,maybe you can have a look and see what is wrong.

I solved it,thanks to everyone ! :slight_smile:

1 Like

Cheers @Nostradamon1

Could you please share the project file or tell us how you solved it?