theninjamanz 29 Posted September 5, 2013 Report Share Posted September 5, 2013 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. 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.