3

Is there a way to change the proxy between requests (for the same casper object):

somthing like that:

 var casper=require('casper').create({
                clientScripts: ["lib/js/jquery.min.js"],
                // other settings...
 });


casper.start("http://www.site1.com",function(){

   casper.setProxy("http://xxx.xx.xx.xx:80");  // is there somthing like that ?


   casper.thenOpen("http://www.site2.com",function(){  // through the proxy i set above...

       // some code...
   });
});
casper.run(function(){casper.exit();});
yoav barnea
  • 5,836
  • 2
  • 22
  • 27
  • Probably not if you only want to use casperjs, see [here](http://stackoverflow.com/questions/21475273/casperjs-configure-proxy-options-inside-code) and [here](http://stackoverflow.com/questions/16746603/phantom-js-casper-js-with-rotating-proxy). Can you elaborate why you would need that? – Artjom B. Jun 22 '14 at 11:38

0 Answers0