Jump to content
UBot Underground

Strange Issue with Loops(Ubot generates Errors)


Recommended Posts

Hey guys i am having the weirdest problem i cant seem to find the error this time mainly cause there is no error until about 18,19th loop.

 

So Script starts acting weird after about 18 loops it starts to generate a lot of errors so i attached few photos just to see what happens!

Those pictures attached are some of the errors i encounter when the script runs after about 18 loops until that it all works fine no problem whatsoever!

 

Please advise me what am i doing wrong also here is the script attached

 

Script also has an UI panel made from Carl-s tool for designing SSUB i excluded it in here cause apparently my post was too long! ,if anyone can help me with this please do i am going crazy cause this keeps happening!

 

Help Guys Please!

 

 

define Stop {
    set(#Stop,$true,"Global")
}
define Begin Scraping {
    clear table(&BOSS BRAND)
    clear list(%linkovilista)
    clear list(%LINKOVI)
    set(#Stop,$false,"Global")
    set table cell(&BOSS BRAND,0,0,"PRODUCT TITLE")
    set table cell(&BOSS BRAND,0,1,"SKU")
    set table cell(&BOSS BRAND,0,2,"PRICE")
    set table cell(&BOSS BRAND,0,3,"DESCRIPTION")
    set table cell(&BOSS BRAND,0,4,"PRODUCT URL")
    divider
    divider
    navigate("http://www.vminnovations.com/search/index.html?q=boss%20audio&sort=&show=12&page=1&manuf=63","Wait")
    wait(4)
    set(#row,1,"Global")
    loop(#howmanypages) {
        if($comparison(#Stop,"=",$true)) {
            then {
                stop script
            }
            else {
            }
        }
        set(#linkovi,$scrape attribute(<outerhtml=w"<a href=\"/Product_*.html\" class=\"itemLink\">*</a>">,"href"),"Global")
        add item to list(%linkovilista,#linkovi,"Delete","Global")
        add list to list(%LINKOVI,$list from text(#linkovi,$new line),"Delete","Global")
        click(<outerhtml=w"<a href=\"/search/index*\">Next*</a>">,"Left Click","No")
        wait(5)
    }
    loop($list total(%LINKOVI)) {
        if($comparison(#Stop,"=",$true)) {
            then {
                stop script
            }
            else {
            }
        }
        navigate("http://www.vminnovations.com/{$next list item(%LINKOVI)}","Wait")
        wait(5)
        set table cell(&BOSS BRAND,#row,0,$scrape attribute(<id="productTitle">,"innertext"))
        set table cell(&BOSS BRAND,#row,1,$scrape attribute(<itemprop="sku">,"innertext"))
        set table cell(&BOSS BRAND,#row,2,$scrape attribute(<itemprop="price">,"innertext"))
        set table cell(&BOSS BRAND,#row,3,$scrape attribute(<itemprop="description">,"innertext"))
        set table cell(&BOSS BRAND,#row,4,$url)
        increment(#row)
    }
    save to file("{$special folder("Desktop")}\\BOSS BRAND.csv",&BOSS BRAND)
    alert("Scraper Completed,All Info are on your Desktop!")
}
ui drop down("How Many Pages To Scrape?","1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,51,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100",#howmanypages)
divider
divider

post-18544-0-55145700-1417533105_thumb.jpg

post-18544-0-76769600-1417533107_thumb.jpg

post-18544-0-63059500-1417533109_thumb.jpg

post-18544-0-80515000-1417533111_thumb.jpg

post-18544-0-80776400-1417533113_thumb.jpg

Link to post
Share on other sites
  • 2 years later...

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...