Skip to content Skip to sidebar Skip to footer

Server Side Browser That Can Execute Javascript

Is there any programming libraries available that will parse an HTML document, execute JavaScript and then allow me to navigate the DOM?  This needs to be performed server side, n

Solution 1:

Solution 2:

in java: http://lobobrowser.org/cobra/java-html-parser.jsp this is a a Javascript-aware, CSS-aware HTML parser the most important feature in relation to your question: It is Javascript-aware. DOM modifications that occur during parsing will be reflected in the resulting DOM.

Solution 3:

Java has support for javascript with Rhino, also look at this page for server side javascript solutions: http://en.wikipedia.org/wiki/Server-side_JavaScript

Solution 4:

For Java, be sure to check out HtmlUnit and HttpUnit.

Solution 5:

PhantomJS does this and can be used with any server side language. See some integration modules below for NodeJS and PHP

NodeJS

https://npmjs.org/package/node-phantom

https://github.com/sgentle/phantomjs-node

PHP

https://github.com/diggin/php-PhantomjsRunner

Post a Comment for "Server Side Browser That Can Execute Javascript"