NinjaBots 0 Posted January 24, 2016 Report Share Posted January 24, 2016 (edited) So, I have been watching tutorials and practicing the past couple of days. I am following this video at the moment, https://www.youtube.com/watch?v=lMokKPGSljs I have this code now, but Ubot keep throwing an error. ui stat monitor("Movie Titles:",$list total(%movietitles))ui stat monitor("Thumbnails:",$list total(%thumbnailURLs))ui stat monitor("Full Size: ",$list total(%LargeImageUrls))define Scrape Data { clear table(&movieposters) clear list(%movietitles) clear list(%thumbnailURLs) clear list(%LargeImageUrls) clear list(%movieposterurl) navigate("http://www.allposters.com/-st/Movie-Posters_c101_.htm","Wait") add list to list(%movietitles,$scrape attribute(<class="nuln shortenedTitle">,"innertext"),"Don\'t Delete","Global") add list to table as column(&movieposters,0,0,%movietitles) add list to list(%thumbnailURLs,$scrape attribute(<class="thmbd galImage">,"src"),"Delete","Global") add list to table as column(&movieposters,0,1,%thumbnailURLs) add list to list(%movieposterurl,$scrape attribute(<class="nuln shortenedTitle">,"fullhref"),"Delete","Global") loop($list total(%movieposterurl)) { navigate($next list item(%movieposterurl),"Wait") add list to list(%LargeImageUrls,$scrape attribute(<class="mainImage shadow">,"src"),"Delete","Global") } add list to table as column(&movieposters,0,2,%LargeImageUrls) save to file("{$special folder("Desktop")}/temp/movieposters.csv",&movieposters)}Scrape Data() Error http://i.imgur.com/I9yV5Hu.png?1 What am I doing wrong here? Would appreciate your help.. Edited January 24, 2016 by NinjaBots Quote Link to post Share on other sites
Brutal 164 Posted January 24, 2016 Report Share Posted January 24, 2016 Go into "options" - Turn off all error reporting. Run your script Did you get the desired result? If yes, then the error doesn't matter since the customer will never see it. If no, then come back and let us know and someone will certainly jump in to provide more help. Quote Link to post Share on other sites
NinjaBots 0 Posted January 24, 2016 Author Report Share Posted January 24, 2016 Thanks for the quick reply!! I turned off the errors , but still I don't get the results I am looking for.. Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted January 24, 2016 Report Share Posted January 24, 2016 That tutorial is from 2011 its likely the site your scraping from has changed, just a thought CJ Quote Link to post Share on other sites
HelloInsomnia 1103 Posted January 25, 2016 Report Share Posted January 25, 2016 Give this a shot, it should work better for you. I had some issues with that site loading things fast enough so there is a lot of waiting and hopefully it works correctly or there may need to be more waiting added: ui stat monitor("Movie Titles:",$list total(%movietitles)) ui stat monitor("Thumbnails:",$list total(%thumbnailURLs)) ui stat monitor("Full Size: ",$list total(%LargeImageUrls)) clear table(&movieposters) clear list(%movietitles) clear list(%thumbnailURLs) clear list(%LargeImageUrls) clear list(%movieposterurl) navigate("http://www.allposters.com/-st/Movie-Posters_c101_.htm","Wait") add list to list(%movietitles,$scrape attribute(<class="nuln shortenedTitle">,"innertext"),"Don\'t Delete","Global") add list to table as column(&movieposters,0,0,%movietitles) add list to list(%thumbnailURLs,$scrape attribute(<class="thmbd galImage">,"src"),"Delete","Global") add list to table as column(&movieposters,0,1,%thumbnailURLs) add list to list(%movieposterurl,$scrape attribute(<class="nuln shortenedTitle">,"fullhref"),"Delete","Global") loop($list total(%movieposterurl)) { navigate($next list item(%movieposterurl),"Wait") wait for browser event("Everything Loaded","") wait for element(<class="mainImage shadow">,"","Appear") wait(1) add list to list(%LargeImageUrls,$scrape attribute(<class="mainImage shadow">,"src"),"Delete","Global") } add list to table as column(&movieposters,0,2,%LargeImageUrls) save to file("{$special folder("Desktop")}/temp/movieposters.csv",&movieposters) 2 Quote Link to post Share on other sites
NinjaBots 0 Posted January 26, 2016 Author Report Share Posted January 26, 2016 let me check this. Thanks HelloInsomnia ! 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.