Jump to content
UBot Underground

Tutorial: Randomly loading something from a .txt list and then deleting the item from the .txt


Recommended Posts

I thought I'd share this script as it will probably be quite helpful to a few people, and some kind fellows here have given me some good advice these past few days. The aim of script is to navigate randomly through a list of URLS stored in a text file, and to remove the random URL from a text file each time at each look.

 

So, if you had a list of 100 URLS you could randomly cycle through all of them safe in the knowledge that no URL will be called more than once.

 

At the moment it is setup to navigate to the random URL, but equally you could use it against proxy lists, with a condition that when the variable #total list size = 1 do go and scrape some more or to stop.

 

You can also use it as a standalone list shuffler and just assign it to a button in the ui

add list to list(%URLList, $list from file("{$special folder("Application")}\\urllist.txt"), "Delete", "Global")
set(#Total List Size, $list total(%URLList), "Global")
loop(#Total List Size) {
    set(#Total List Size, $list total(%URLList), "Global")
    set(#Random URL, $list item(%URLList, #Random Number), "Global")
    navigate(#Random URL, "Wait")
    remove from list(%URLList, #Random Number)
    save to file("{$special folder("Application")}\\urllist.txt", %URLList)
    wait for browser event("Everything Loaded", "")
    wait($rand(5, 10))
    wait(3)
}

Enjoy.

 

:)

 

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