Is there a command line tool that allows you to get the text of the JavaScript interpreted source of a web page similar to how you can see the interpreted code in FireBug on FireFox?
I would like to use CURL or similar tool to request a web page. The catch is I would like to view how the code has been modified by JavaScript. For instance if the dom has been changed or an element has been modified, I would like to see the modified version. I know FireBug does this for FireFox, but I am looking for a way to script the process.
Have you looked in to tools like PhantomJS for running the tests? Many of them support running a “headless” browser, which lets you render pages and run JS against the rendered page without having to actually run a browser. It doesn’t use
curl, but I don’t see why that should be a requirement.For instance:
with save_page.js: