Jump to content
UBot Underground

Issue Scraping Youtube Data With Exbrowser


Recommended Posts

I'm sure I'm overlooking something simple, but for some reason some xpath that I think should be working isn't - I've used similar commands on other websites, but for some reason I get blank results with the code below:

 

 

On a YouTube search page, such as https://www.youtube.com/results?search_query=nine+inch+nails

 

I'm trying to get the Channel / Username right under the title of each video.

 

 

When I use:

set(#test,$plugin function("ExBrowser.dll", "$ExBrowser Scrape Element", "x://a[@class=\'yt-simple-endpoint style-scope yt-formatted-string\'][1]"),"Global")
It will pull the first result correctly, but it doesn't pull any other number, so for example:
set(#test,$plugin function("ExBrowser.dll", "$ExBrowser Scrape Element", "x://a[@class=\'yt-simple-endpoint style-scope yt-formatted-string\'][2]"),"Global")
 
Doesn't pull any results.
 
 
So basically I'm trying to loop through the top 10 results and update the xpath number variable to do so, but for some reason it only pulls data when the number is 1.
 
I've not run into this issue before - does anyone have any idea what I should do instead or any insight? I would greatly appreciate it.
Link to post
Share on other sites

add list to list(%scrape all,$plugin function("ExBrowser.dll", "$ExBrowser Scrape List Elements", "//yt-formatted-string[contains(@class,\"channel-name\")]/a"),"Delete","Global")

 

 

That worked perfectly, thank you! I really appreciate the assistance

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...