itexspert 47 Posted December 2, 2014 Report Share Posted December 2, 2014 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)dividerdivider Quote Link to post Share on other sites
JackCrow 4 Posted December 31, 2016 Report Share Posted December 31, 2016 please let me know if you've found an answer to this Quote Link to post Share on other sites
TheBigWeb 40 Posted January 7, 2017 Report Share Posted January 7, 2017 Have you performed a step-through to see what part of the code is causing the errors? 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.