I am trying to scrape book genre information from google.
Much like when you put a calculation/conversion into google, the result displays in a box above the search results. I can scrape the data within this box in the browser (console) quite easily, however when I attempt the same code within casper, the content boxes don't appear anywhere in the code. The only way I can replicate this in browser is if I turn JS off.
I'm not sure why a different format is displayed to CasperJS and my own browser, but is there a way to get them to be the same? Here is the current code I am using, where
casper.start();
casper.userAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) ');
casper.thenOpen(links, function() {
casper.waitForSelector('.answer_predicate', function() {
this.echo(this.getHTML('.answer_predicate'));
});
});
casper.run();
}