爬虫之Scrapy

一、安装框架依赖库

准备

安装之前先安装wheel库因为直接安装scrapy框架很多依赖库会安装失败,这些库是通过wheel安装的

whl类库地址:https://www.lfd.uci.edu/~gohlke/pythonlibs

1、安装wheel

pip install wheel

2、安装Twisted
whl库搜索twisted 选择跟当前python环境配对的whl cp39代表3.9版本python amd64代表64位系统
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

image.png

在下载的文件目录cmd命令直接运行

pip install Twisted-20.3.0-cp39-cp39-win_amd64.whl

3、安装pywin32
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pywin32

pip install pywin32-300-cp39-cp39-win_amd64.whl

二、安装Scrapy框架

pip install Scrapy

三、测试是否安装成功

scrapy

输入scrapy命令出现以下内容则代表安装成功


image.png

scrapy文档地址 https://scrapy-chs.readthedocs.io/zh_CN/latest/intro/overview.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容