Jump to content
UBot Underground

Help With This Example Code


Recommended Posts

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 by NinjaBots
Link to post
Share on other sites

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.

Link to post
Share on other sites

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)

  • Like 2
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...