本文总结了与Scrapy框架相关的一些开源工具
1、scrapyd项目地址:https://github.com/scrapy/scrapyd
文档: https://scrapyd.readthedocs.io/
Scrapyd 是一个运行 Scrapy 爬虫程序的服务
pip install scrapyd
scrapyd # 启动服务
环境测试: http://localhost:6800/
项目地址:https://github.com/djm/python-scrapyd-api
一个 Scrapyd API 的python封装
pip install python-scrapyd-api
from scrapyd_api import ScrapydAPI
scrapyd = ScrapydAPI('http://localhost:6800')
3、ScrapydArt
项目地址:https://github.com/dequinns/ScrapydArt
ScrapydArt在Scrapyd基础上新增了权限验证、筛选过滤、排序、数据统计以及排行榜等功能,并且有了更强大的API
pip install scrapydart
$ scrapydart # 启动
web界面 http://localhost:6800
项目地址:https://github.com/my8100/scrapydweb
功能特性: Scrapyd 集群管理 Scrapy 日志分析 支持所有 Scrapyd API web UI 支持 Basic Auth
pip install scrapydweb
$ scrapydweb -h # 初始化
$ scrapydweb # 启动
管理页面:http://127.0.0.1:5000
参考: 如何通过 Scrapyd + ScrapydWeb 简单高效地部署和监控分布式爬虫项目
5、Gerapy项目地址:https://github.com/Gerapy/Gerapy
一款分布式爬虫管理框架 控制爬虫运行, 查看爬虫状态, 查看爬取结果, 项目部署, 主机管理, 编写爬虫代码
pip3 install gerapy
$ gerapy init
$ cd gerapy
$ gerapy migrate
$ gerapy runserver
web界面: http://localhost:8000
参考: scrapyd部署、使用Gerapy 分布式爬虫管理框架
6、SpiderKeeper项目地址:https://github.com/DormyMo/SpiderKeeper 一个scrapyd的可视化工具
pip install spiderkeeper
$ spiderkeeper # 启动
web ui : http://localhost:5000
github: https://github.com/mouday/SpiderAdmin pypi: https://pypi.org/project/spideradmin/
功能介绍 1、对Scrapyd 接口进行可视化封装,对Scrapy爬虫项目进行删除 和 查看
2、对爬虫设置定时任务,支持apscheduler 的3中方式和随机延时,共计4中方式 单次运行 date 周期运行 corn 间隔运行 interval 随机运行 random
3、基于Flask-BasicAuth 做了简单的权限校验
启动运行
$ pip3 install spideradmin
$ spideradmin # 启动服务
访问: http://127.0.0.1:5000/
Github: https://github.com/mouday/spider-admin-pro
Gitee: https://gitee.com/mouday/spider-admin-pro
Pypi: https://pypi.org/project/spider-admin-pro
Spider Admin Pro 是Spider Admin的升级版
简化了一些功能; 优化了前端界面,基于Vue的组件化开发; 优化了后端接口,对后端项目进行了目录划分; 整体代码利于升级维护。 目前仅对Python3进行了支持
运行启动
$ pip3 install spider-admin-pro
$ python3 -m spider_admin_pro.run