M
M
Michael R.2017-02-06 00:16:40
JavaScript
Michael R., 2017-02-06 00:16:40

PhantomJS how to wait for the page to fully load?

Hello!
I am parsing the Avito page - everything is fine. I am parsing a site in which all blocks appear after 1-2 seconds. after loading the page - displays only the background.
How can I specify a phantom in my code so that it waits until all page elements are loaded and then parses this page?
Similarly, I want to make a screen of the page, but again, only the background of the site is screened...

page.open(url, function (status) {

    var content = page.content;
    console.log(content);

    phantom.exit();
});


Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2017-02-06
@Mike_Ro

Throw the phantom away and use nightmare

V
void64rus, 2017-11-28
@void64rus

You can use network activity monitoring

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question