Jump to content
UBot Underground

Looping within a list


Recommended Posts

Hi All,

 

Back again.. :-)

 

Trying now to add a list to my bot (which I was able to do). In the text file, I added two lines (each has a URL in it.

 

I am getting my bot to pull the URLs, one by one, and navigate to the page within a loop. Problem is, the first URL gets visited twice before it moves onto the next URL. Not sure why that is happening?

 

Within my loop at the bottom, I have put navigate >> URL>> next list item. Shouldn't that have solved the problem??

 

Any help would be appreciated.

 

Thank you

Link to post
Share on other sites

You might want to set a variable called ListCounter and set it to 0.

 

Then in your loop use the command $list total and select your list.

 

Do your loop then at the end increment your ListCounter instead of using next list item.

Link to post
Share on other sites

By what you describe, you do not have a list there, but a variable containing two links, separated by a new line, which only LOOKS LIKE a list, but the two links are in fact under the same 'umbrella' so to speak.

 

Naturally, your looping will bring the same link, because it calls the same variable twice.

 

Also, like I always advocate across this forum, try to get into the habit of losing the $next list item from your daily toolset and replace that with $list item instead, to make sure you call exactly the list item/element you want.

 

In order to have your list be a real list as you want it, make sure to load it from file using $new line as the list separator in the $list from text(file), which is what I suspect you were using.

Better yet, use $add list to list, which will basically take care of it for you.

 

Hope this helps...

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