2

I am able to access Google to get a page title:

var casper = require('casper').create(); casper.start('http://google.com', function() { this.echo(this.getTitle()); }) casper.run(); // "Google" 

But for some reason I'm not able to get the iTunes Connect page:

var casper = require('casper').create(); casper.start('https://itunesconnect.apple.com', function() { this.echo(this.getTitle()); }) // Undefined 

How would I successfully request the above page?

Here is what I currently get:

[info] [phantom] Starting... [info] [phantom] Running suite: 2 steps [debug] [phantom] opening url: https://itunesconnect.apple.com/, HTTP GET [debug] [phantom] Navigation requested: url=https://itunesconnect.apple.com/, type=Other, willNavigate=true, isMainFrame=true [warning] [phantom] Loading resource failed with status=fail: https://itunesconnect.apple.com/ [debug] [phantom] Successfully injected Casper client-side utilities [object Casper], currently at about:blank [info] [phantom] Step anonymous 2/2: done in 66ms. [info] [phantom] Done 2 steps in 86ms 
2
  • What version of PhantomJS do you use? Please register to the resource.error, page.error, remote.message and casper.page.onResourceTimeout events (Example). Maybe there are errors. Commented Aug 6, 2015 at 19:59
  • @ArtjomB. how would I apply the above inside the start() function? Commented Aug 6, 2015 at 22:32

1 Answer 1

1

You need to specify ssl when running the script:

casperjs --ssl-protocol=tlsv1 script.js 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.