I cant understand how to using proxies in phantomjs, i tried
phantomjs example.js --proxy="ip:port"
phantomjs example.js --proxy=ip:port
phantomjs example.js --proxy=ip:port --proxy-type=http
but i see only my ip=(
No any output, also if proxy ip apriori invalid.
example.js:
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.onLoadFinished = function(status){
if (!status){
console.log('fail');
phantom.exit();
}
page.render("1.png");
phantom.exit();
};
page.open("http://whoer.net/");
what obvious thing i forgot? Thanks.