Python中pyspider框架的安装及使用

一、在Python的terminal 

1、敲命令pip install pyspider安装pyspider

Python中pyspider框架的安装及使用

2、看到图中方框里的句子表示成功安装

Python中pyspider框架的安装及使用

二、在浏览器中下载phantomjs软件

1、下载好之后解压到文件夹中,找到bin文件夹下的phantomjs.exe并文件将其复制到与python.exe同一级文件夹中

Python中pyspider框架的安装及使用

Python中pyspider框架的安装及使用

2、粘贴过之后是这样的

Python中pyspider框架的安装及使用

3、在cmd窗口中敲pyspider all启动

Python中pyspider框架的安装及使用

4、如果出现0.0.0.0:5000字样,说明启动成功,在浏览器的地址中敲localhost:5000,如果没有0.0.0.0:5000字样。

Python中pyspider框架的安装及使用

5、可以按Ctrl+C 停止,从新启动,就可以了.

Python中pyspider框架的安装及使用

三、pyspider在浏览器中的使用

Python中pyspider框架的安装及使用

出来这个就可以用了

Python中pyspider框架的安装及使用