Grey Hat 4 Posted January 30, 2012 Report Share Posted January 30, 2012 (edited) Hi, So, when building bots that use proxies, does anyone have any ideas on a command that tests the proxie entered within the variable field? Let's say you have a very long UBot script that goes from site to site to site using one proxie to do various tasks, but because this bot takes a long time to execute all of these commands the proxie falls off somewhere on site 25 or 26... If my client is too cheap to pay for private proxies he/she will most likely scrape public ones and those are less reliable. So I'm trying to figure out two things: 1) How to test the proxie before the next task that doesn't take a whole lot of time and if the proxie fails it goes to the next proxie in a list2) How to avoid slow public proxies time out errors. In other words, if the program hangs up because the proxie server is too slow, then it switches to next one Any ideas? Thanks! Edited January 30, 2012 by ArizonaSlim2011 Quote Link to post Share on other sites
JohnB 255 Posted January 30, 2012 Report Share Posted January 30, 2012 You can have an if/then statement checking for the error message a bad proxy triggers and have it change proxies when it finds one. John Quote Link to post Share on other sites
a2mateit 395 Posted January 30, 2012 Report Share Posted January 30, 2012 As John said an if/then statement would work great. At the beginning of your script you can navigate to a website that checks a proxy such as: http://www.checker.freeproxy.ru/checker/index.php Then enter your proxie and check it. If it's good then continue, if else then change proxie. If I get some time I will code something up as an example. -Justin Quote Link to post Share on other sites
UBotBuddy 331 Posted January 30, 2012 Report Share Posted January 30, 2012 I use the "Loop While" node in conjunction with If/Else. You just need to be careful that you can terminate the Looping process. Quote Link to post Share on other sites
JohnB 255 Posted January 30, 2012 Report Share Posted January 30, 2012 I use the "Loop While" node in conjunction with If/Else. You just need to be careful that you can terminate the Looping process. Yeah, I think you can still accomplish this by using the loop while $exists, or loop while $not--->$exists (whichever is more relevant to your code) John 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.