Server side browser that can execute JavaScript

后端 未结 9 1188
北海茫月
北海茫月 2021-01-05 08:05

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 s

9条回答
  •  [愿得一人]
    2021-01-05 08:48

    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

提交回复
热议问题