wget + JavaScript?

Jake Wilson picture Jake Wilson · May 5, 2011 · Viewed 51k times · Source

I have this webpage that uses client-side JavaScript to format data on the page before it's displayed to the user.

Is it possible to somehow use wget to download the page and use some sort of client-side JavaScript engine to format the data as it would be displayed in a browser?

Answer

Alex Wayne picture Alex Wayne · May 5, 2011

You could probably make that happen with something like PhantomJS

You can write a phantomjs script that will load the page like a browser would, and then either take screenshots or use JS to inspect the page and pull out data.