javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -



javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

i've had issues casperjs , ssl, using --ssl-protocol=any has fixed problem, referenced in this answer. in case, i'm still having issues.

i set in command line:

casperjs --ssl-protocol=any --ignore-ssl-errors=true sanity.js

this sanity.js:

var casper = require('casper').create({ verbose: true, loglevel: 'debug' }); casper.on("resource.error", function(resourceerror){ console.log('unable load resource (#' + resourceerror.id + 'url:' + resourceerror.url + ')'); console.log('error code: ' + resourceerror.errorcode + '. description: ' + resourceerror.errorstring); }); casper.start('https://www.google.com/', function() { this.echo(this.gettitle()); }); casper.thenopen('https://www.zazzle.com/lgn/signin', function() { this.echo(this.gettitle()); }); casper.run();

the first url loads fine. ssl handshake fails in sec one. debug output:

[info] [phantom] starting... [info] [phantom] running suite: 4 steps [debug] [phantom] opening url: https://www.google.com/, http [debug] [phantom] navigation requested: url=https://www.google.com/, type=other, willnavigate=true, ismainframe=true [debug] [phantom] url changed "https://www.google.com/" [debug] [phantom] injected casper client-side utilities [info] [phantom] step anonymous 2/4 https://www.google.com/ (http 200) google [info] [phantom] step anonymous 2/4: done in 876ms. [debug] [phantom] opening url: https://www.zazzle.com/lgn/signin, http [debug] [phantom] navigation requested: url=https://www.zazzle.com/lgn/signin, type=other, willnavigate=true, ismainframe=true unable load resource (#9url:https://www.zazzle.com/lgn/signin) error code: 6. description: ssl handshake failed [warning] [phantom] loading resource failed status=fail: https://www.zazzle.com/lgn/signin [info] [phantom] step anonymous 4/4 https://www.google.com/ (http 0) google [info] [phantom] step anonymous 4/4: done in 1178ms. [info] [phantom] done 4 steps in 1197ms

i'm running phantomjs version 1.9.7 , casperjs version 1.1.0-beta3. i'm bit clueless when comes finer points of ssl, i'm having problem finding more ways prepare this. help awesome!

javascript ssl web-scraping phantomjs casperjs

Comments

Popular posts from this blog

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

python - Received unregistered task using Celery with Django -