André
André

Reputation: 25584

PhantomJs & CasperJs - which one for scraping a web app built on JavaScript?

I need to scrape a web app that for the most part is build on top of JavaScript, for example, when I click a link there is a Ajax Request that will bring the result.

I've been doing some tests with PhantomJS. What I need to know is: Is PhantomJS enough to scrape a webpage like this or I will need to use on the top of this something like CasperJS?

Upvotes: 0

Views: 294

Answers (1)

Artjom B.
Artjom B.

Reputation: 61952

Since CasperJS is built on-top of PhantomJS, you can do everything in PhantomJS that you would be able to in CasperJS. The only difference is that it is faster and more comfortable to write navigational code with CasperJS.

PhantomJS is a full (headless) browser. So, everything that you can do with an ordinary non-headless browser, you can also do with PhantomJS/CasperJS. Limitations are usually the available features of the browser. The recently released PhantomJS 2 now supports many web standards which shouldn't be a problem anymore like it was with PhantomJS 1.x. Flash support is still a problem and requires a patch and a compilation procedure.

Upvotes: 1

Related Questions