solidrockguy 1 Posted December 12, 2017 Report Share Posted December 12, 2017 I am trying to put in a search term in google images like "mouse" for example https://www.google.com/search?q=mouse&num=100&hl=en&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiigqjyh4XYAhWBfCYKHQauDwQQ_AUICigB&biw=1440&bih=803 and then have a bot that will download all of the FULL SIZE Images that are available only when you click on the View Image button from within the image once it is clicked on. I am doing this in exbrowser and have tried a variety of xpath expressions but nothing seems to catch the url or open the url. I am okay with either clicking on the link to open it in a new browser or just scraping the url - whatever works best. Here is a sample of the code I have tried. I am using them individually (I know they are redundant - just trying variations) while I'm debugging but still no results. Anyone have any good way to do this? set(#currentbrowserhtml,$plugin function("ExBrowser.dll", "$ExBrowser Document Text"),"Global") add list to list(%picurls,$plugin function("ExBrowser.dll", "$ExBrowser Scrape List Elements Attribute", "x://a", "data-href"),"Delete","Global") set(#picurl,$plugin function("ExBrowser.dll", "$ExBrowser Scrape Element", "x://a//@data-href"),"Global") set(#picurl,$plugin function("ExBrowser.dll", "$ExBrowser Scrape Element Attribute", "x://a//", "data-href"),"Global") Quote Link to post Share on other sites
HelloInsomnia 1103 Posted December 12, 2017 Report Share Posted December 12, 2017 This may help, haven't checked it out too much but it did scrape some images when they were clicked on: add list to list(%images,$plugin function("ExBrowser.dll", "$ExBrowser Scrape List Elements Attribute", "//a[contains(@class, \'irc_fsl\')]", "href"),"Delete","Global") Quote Link to post Share on other sites
solidrockguy 1 Posted December 13, 2017 Author Report Share Posted December 13, 2017 That will be helpful but how did you get it to click on the "View image" button? When I use the contains text in the xpath it doesn't work consistently. Any help is really appreciated 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.