scrapy框架
安装
Linux:
pip3 install scrapy
Windows:
a. pip3 install wheel
b. 下载twisted http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
下载并安装twisted的wheel文件,CP对应Python版本:
c. 进入下载目录,执行 pip3 install Twisted‑17.1.0‑cp35‑cp35m‑win_amd64.whl
d. pip3 install pywin32
e. pip3 install scrapy
安装完成后,在终端输入scrapy,如果有反应则代表安装成功。
如果没有反应,重新安装scrapy:
它会给你一个提示:
你需要将提示中的路径加入环境变量即可。
三.基础使用
1.创建项目:scrapy startproject 项目名称
项目结构:
浙公网安备 33010602011771号