Adi
Adi

Reputation: 1

Get content from websites populated with javascript

I use "Simple Html Dom" to scrape into websites but I have a problem. Where I inspect the page, I see a div with a specific id, but when I check the source code, that id does not appear.

This means that my simplehtmldom library can't get the information inside that div.

Upvotes: 0

Views: 76

Answers (1)

ymz
ymz

Reputation: 6914

use casper - it's a library for js and it trully simple:

casper.start('http://my.website.com/');

casper.waitForSelector("#plop", function() 
{
    this.echo("I'm sure #plop is available in the DOM");
});

find more @ the official docs: http://casperjs.readthedocs.org/en/latest/modules/casper.html

Upvotes: 2

Related Questions