运行 没有 Selenium 的 Phantomjs

Running Phantomjs Without Selenium

有什么办法运行PhantomJS without Selenium?

PhantomJS 是一个合适的独立程序,您可以自己构建或获取预构建的二进制文件。

只需从 official website 下载与您的操作系统对应的二进制文件并从 command-line 启动它:

Linux,MacOS:
./phantomjs script.js

Windows:
phantomjs.exe script.js