./phantomjs/bin/phantomjs --web-security=no --ssl-protocol=any --load-images=yes test.js "https://somelinkwithimages.com"
var page = require('webpage').create(); var system = require('system'); var address; if (system.args.length === 1) { phantom.exit(1); } address = system.args[1]; page.onResourceError = function(resourceError) { console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString); }; page.open(address, function(status) { if(status === 'success' ){ var title = page.evaluate(function() { return document.title; }); } if (status !== 'success') { console.log("ERROR_PAGE_LOADING address loading failure"); phantom.exit(ERROR_PAGE_LOADING); } else { console.log("seems like working"); phantom.exit(); } }); console.log("Something is happening");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)