Load a web page, execute its JavaScript and dump resulting HTML to a file

前端 未结 1 1232
清酒与你
清酒与你 2021-01-20 04:37

I need to load a web page, execute its JavaScript (and all js files included with the tags) and dump resulting HTLM to a file. This needs to be done on the server. I have t

相关标签:
1条回答
  • 2021-01-20 05:13

    Perhaps that’s because you are using err.message whereas err is not defined? error, on the other hand, is defined.


    Update

    Did you check out PhantomJS?

    Also, it looks like Aptana Jaxer could do what you want. To quote John Resig:

    Imagine ripping off the visual rendering part of Firefox and replacing it with a hook to Apache instead - roughly speaking that's what Jaxer is.

    0 讨论(0)
提交回复
热议问题