D
D
Dark_Dante2015-12-29 15:53:25
JavaScript
Dark_Dante, 2015-12-29 15:53:25

Why isn't phantom.js loading the page?

Hello. Such a problem.
There is a server on ubuntu 14.04
Installed phantom.js Hello.js
script

console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://www.phantomjs.org/';
page.open(url, function (status) {
    //Page is loaded!
    page.render('/home/user/phantomjs.png');
    phantom.exit();
});

I launch phantomjs /home/user/hello.js for execution
The first output to the console works out. And then nothing. So the inscription Loading a web page hangs.
I didn't wait for the page to load. Either phantom.js does not load the page at all, or it loads very slowly.
How to deal with it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
timfcsm, 2015-12-29
@Dark_Dante

remove www from the address... they have some jamb with the site with www, it resets by timeout)

N
Nikolai, 2015-12-29
@evikbook

What is the capacity of the server (ram, cpu)?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question