1、下载phantomjs和 Casper

  phantomjs下载地址:http://phantomjs.org/download.html 

  windows10 phantomjs 安装和使用

  Casper下载地址:http://casperjs.org/

  windows10 phantomjs 安装和使用

2、分别解压后

  在D盘分别建立phantomjs和casperjs文件夹

  windows10 phantomjs 安装和使用

  windows10 phantomjs 安装和使用

3、修改环境变量

 

   windows10 phantomjs 安装和使用

  4、测试是否安装成功

  打开cmd,输入phantomjs --version以及casperjs --version分别查看他们的版本信息,如果版本信息能够查询成功,就说明已经安装成功,如下图:

  windows10 phantomjs 安装和使用

  在下载后phantomjs解压发现有examples例子:

  windows10 phantomjs 安装和使用

  在该路径下 运行其中的一个hello.js

  windows10 phantomjs 安装和使用

  5、把phantomjs.exe拷贝到python2.7的Scripts文件夹下,为了方便以后用

  windows10 phantomjs 安装和使用

 

相关文章: