Set -933 error handler when switching proxies

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
User avatar
bobis
Posts: 364
Joined: Sat Sep 11, 2010 3:34 pm
Contact:

Set -933 error handler when switching proxies

Post by bobis » Fri Nov 16, 2012 1:15 pm

I'm using imacros Firefox add-on 7.6.0.2 on Firefox 15 and have serious problem with proxy switching while using proxy list: if I try to load page after setting proxy from the list and proxy is dead (got error -933) it stops to load pages from that moment (url goto does not work anymore until I restart browser)

Here is simple js code which will help you to identify the problem:

Code: Select all

var openlist,ret;
openlist =  "CODE:";
openlist +=  "SET !timeout 30" + "\n"; 
openlist +=  "tab CLOSEALLOTHERS" + "\n";
openlist +=  "SET !DATASOURCE _full_list.txt" + "\n"; 
openlist +=  "SET !DATASOURCE_COLUMNS 1" + "\n"; 
openlist +=  "SET !DATASOURCE_LINE {{pc}}" + "\n";
openlist +=  "PROXY ADDRESS={{!col1}}" + "\n";
openlist +=  "tab t=1" + "\n";
openlist +=  "url goto=http://www.bestmacros.com" + "\n";
for(i=1;i<=12;i++){
iimSet("pc",i);
ret=iimPlay(openlist);
}
------------------------------
_full_list.txt
--------------------------------

Code: Select all

78.46.186.204:8080
178.218.224.3:3128
81.27.79.181:8080
90.151.160.196:1080
90.150.9.38:1080
193.13.64.156:3128
62.212.74.30:10659
81.27.79.166:8080
109.225.110.29:8080
46.23.64.124:8080
188.143.232.239:85
157.181.228.154:3128
Last edited by bobis on Mon Nov 26, 2012 10:55 am, edited 1 time in total.
Get Best iMacros scripts at http://imacrosbot.com/
Tom, Tech Support
Posts: 3527
Joined: Mon May 31, 2010 4:59 pm

Re: BUG! URL GOTO does not work after changing proxy

Post by Tom, Tech Support » Sun Nov 25, 2012 6:43 pm

Hi bobis,

I tested your script by adding the following code to the for loop:

Code: Select all

for(i=1;i<=12;i++){
iimSet("pc",i);
ret=iimPlay(openlist);
if (ret == -933)
{
	iimPlay("CODE:URL GOTO=www.iopus.com");
}
}
If it detects error -933 as a result of not being to load the page with the previous proxy, then it attempts to navigate to some other site (in this case the main iOpus site) using URL GOTO.

In each case, I found that it would always successfully navigate to iopus.com even after hitting a dead proxy. I tested with iMacros 7.6.0.2 on Firefox 17, 16.0.2, and 15.0.1.
Regards,

Tom, iMacros Support
User avatar
bobis
Posts: 364
Joined: Sat Sep 11, 2010 3:34 pm
Contact:

Re: BUG! URL GOTO does not work after changing proxy

Post by bobis » Sun Nov 25, 2012 6:53 pm

yes, this is exactly the problem - it does not switch proxies after getting -933 error code if try to load again SAME URL, if you load any other url - it works fine, as workaround I'm loading local htm page, but will also check your solution with catching -933 error code
Get Best iMacros scripts at http://imacrosbot.com/
User avatar
bobis
Posts: 364
Joined: Sat Sep 11, 2010 3:34 pm
Contact:

Re: BUG! URL GOTO does not work after changing proxy

Post by bobis » Mon Nov 26, 2012 10:52 am

works fine! thanks!
Get Best iMacros scripts at http://imacrosbot.com/
Tom, Tech Support
Posts: 3527
Joined: Mon May 31, 2010 4:59 pm

Re: Set -933 error handler when switching proxies

Post by Tom, Tech Support » Fri Dec 07, 2012 11:11 am

Hi bobis,

Couldn't this issue be due to browser caching? Perhaps attempting to reload the same page (even if trying a different proxy) goes to the cache first.

You could also try using a CLEAR statement between attempts.
Regards,

Tom, iMacros Support
User avatar
bobis
Posts: 364
Joined: Sat Sep 11, 2010 3:34 pm
Contact:

Re: Set -933 error handler when switching proxies

Post by bobis » Fri Dec 07, 2012 11:54 am

"clear" does not solve this problem, sorry.
Get Best iMacros scripts at http://imacrosbot.com/
Tom, Tech Support
Posts: 3527
Joined: Mon May 31, 2010 4:59 pm

Re: Set -933 error handler when switching proxies

Post by Tom, Tech Support » Fri Dec 07, 2012 12:05 pm

Good to know, thanks for trying!
Regards,

Tom, iMacros Support
Post Reply