Access to the link https://disqus.com/profile/login/ from Casperjs keeps returning the following
[warning] [phantom] Loading resource failed with status=fail: https://disqus.com/profile/login/
ensnare.js
var casper = require("casper").create({
verbose: true,
logLevel: "debug"
});
casper.options.timeout = 15000;
casper.start("https://disqus.com/profile/login/", function() {
this.echo("YES!", "GREEN_BAR");
this.echo(this.getTitle());
});
casper.run();
config.json
{"ignoreSslErrors": true, "cookiesFile": "biscuit", "maxDiskCacheSize": 1000, "diskCache": true}
Please be informed that I changed "ignoreSslErrors" to false but it didn't work.
Calling the script from the terminal
./phantomjs --config=config.json casperjs/bin/bootstrap.js --casper-path=casperjs --cli ensnare.js
Screenshot
How go I about solving this problem? I am able to access other pages without issues.
try this (it helped me on Mac OS X):
casperjs --debug=yes --ignore-ssl-errors=true --ssl-protocol=any XYZ.j
Where XYZ.js is your file.
All I needed to do was to have set "sslProtocol": "any" in the config.json file that I used. A proper way to set it can be found in my answer to this question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With