Scrapy-Redis 的安装 | 珊瑚贝

Scrapy-Redis 是 Scrapy 分布式的扩展模块,有了它我们可以方便地实现 Scrapy 分布式爬虫的搭建,本节来介绍一下 Scrapy-Redis 的安装方式。

相关链接

pip 安装

推荐使用 pip 安装,命令如下:

1
pip3 install scrapy-redis

Wheel 安装

也可以到 PyPi 下载 Wheel 文件安装:https://pypi.org/project/scrapy-redis/#downloads,如当前最新版本为 0.7.1,则可以下载 scrapy_redis-0.7.1-py2.py3-none-any.whl ,然后 pip 安装即可。

1
pip3 install scrapy_redis-0.7.1-py2.py3-none-any.whl

测试安装

安装完成之后,可以在 Python 命令行下测试。

1
2
$ python3
>>> import scrapy_redis

如果没有错误报出,则证明库已经安装好了。

来源:https://cuiqingcai.com/31046.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_11556.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?