Question

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

enter image description here How go I about solving this problem? I am able to access other pages without issues.

Was it helpful?

Solution 2

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top