wizeone17 7 Posted January 20, 2014 Report Share Posted January 20, 2014 Hey Guys, My heads about to explode here. I'm looping through search results page and I need to stop loop once a specific text is found. I tried loop, exist and loop while exist but before loop even begins the process it stops. Can someone give me an idea of what would work? Thanks,Wize Quote Link to post Share on other sites
stanf 43 Posted January 20, 2014 Report Share Posted January 20, 2014 try thisscrape search results tp a listthen loop thru the list set(#keep looping, "yes", "Global")loop while($comparison(#keep looping, "=", "yes")) { if($comparison("the item we are looking at", "=", "the thing we are looking for")) { then { set(#keep looping, "no", "Global") } else { comment("keep looking") } }} Quote Link to post Share on other sites
Enigma 78 Posted January 20, 2014 Report Share Posted January 20, 2014 Hey Guys, My heads about to explode here. I'm looping through search results page and I need to stop loop once a specific text is found. I tried loop, exist and loop while exist but before loop even begins the process it stops. Can someone give me an idea of what would work? Thanks,Wize Use loop while NOT exist... Quote Link to post Share on other sites
wizeone17 7 Posted January 20, 2014 Author Report Share Posted January 20, 2014 try thisscrape search results tp a listthen loop thru the list set(#keep looping, "yes", "Global")loop while($comparison(#keep looping, "=", "yes")) { if($comparison("the item we are looking at", "=", "the thing we are looking for")) { then { set(#keep looping, "no", "Global") } else { comment("keep looking") } }} Thanks, will give this a shot stanf. Quote Link to post Share on other sites
wizeone17 7 Posted January 20, 2014 Author Report Share Posted January 20, 2014 Use loop while NOT exist... Hey Enigma, I also tried this ,the funny thing is it works but it keeps killing my regular expression and doesn't scrapes the links any longer. I'm scratching my head on this one. Quote Link to post Share on other sites
Enigma 78 Posted January 20, 2014 Report Share Posted January 20, 2014 Hey Enigma, I also tried this ,the funny thing is it works but it keeps killing my regular expression and doesn't scrapes the links any longer. I'm scratching my head on this one. Loop while not exist has nothing to do with a regular expression so there must be something else wrong. Quote Link to post Share on other sites
wizeone17 7 Posted January 22, 2014 Author Report Share Posted January 22, 2014 Loop while not exist has nothing to do with a regular expression so there must be something else wrong. Yea I know, that's why I'm scratching my head on this.. Thanks buddy. Quote Link to post Share on other sites
UBotDev 276 Posted January 22, 2014 Report Share Posted January 22, 2014 Use loop while NOT exist...I was also using that but after a time found out that it can be problematic. If you use "close page" command and after that "loop while->$not->$exists" UBot will be waiting at exist statement for about 30 seconds, because page was closed and no HTML is there (page could be also empty in some other cases). Because of that I think it's better to use the approach that Stanf pointed out and use navigate command before using $not->$exist. Quote Link to post Share on other sites
theninjamanz 29 Posted January 22, 2014 Report Share Posted January 22, 2014 Can't you just cycle the URLS and then use $exists against the variable and then stop script? Quote Link to post Share on other sites
wizeone17 7 Posted January 22, 2014 Author Report Share Posted January 22, 2014 Use loop while NOT exist... Thanks Enigma it worked out great, the problem wasn't with the regular expression it was another problem. Works like a charm! Quote Link to post Share on other sites
wizeone17 7 Posted January 22, 2014 Author Report Share Posted January 22, 2014 Can't you just cycle the URLS and then use $exists against the variable and then stop script?Thanks ninjamanz I got it working correctly. Quote Link to post Share on other sites
Enigma 78 Posted January 22, 2014 Report Share Posted January 22, 2014 Thanks Enigma it worked out great, the problem wasn't with the regular expression it was another problem. Works like a charm!Ok man, great it works now. 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.