drewness 26 Posted November 23, 2019 Report Share Posted November 23, 2019 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. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted November 23, 2019 Report Share Posted November 23, 2019 add list to list(%scrape all,$plugin function("ExBrowser.dll", "$ExBrowser Scrape List Elements", "//yt-formatted-string[contains(@class,\"channel-name\")]/a"),"Delete","Global") 1 Quote Link to post Share on other sites
drewness 26 Posted November 24, 2019 Author Report Share Posted November 24, 2019 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 Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted November 24, 2019 Report Share Posted November 24, 2019 your welcome. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.