Jump to content
UBot Underground

Loop through search results then stop once certain text is found...


Recommended Posts

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

Link to post
Share on other sites

try this

scrape search results tp a list

then 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")
        }
    }
}

Link to post
Share on other sites

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

Link to post
Share on other sites

try this

scrape search results tp a list

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

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