feapder是一款支持分布式、批次采集、任务防丢、报警丰富的python爬虫框架
Project description
FEAPDER
简介
feapder是一款上手简单,功能强大的Python爬虫框架
读音: [ˈfiːpdə]
1.拥有强大的监控,保障数据质量
监控面板:点击查看详情
2. 内置多维度的报警(支持 钉钉、企业微信、飞书、邮箱)
3. 简单易用,内置四种爬虫,可应对各种需求场景
-
AirSpider
轻量爬虫:学习成本低,可快速上手 -
Spider
分布式爬虫:支持断点续爬、爬虫报警等功能,可加快爬虫采集速度 -
TaskSpider
任务爬虫:从任务表里取任务做,内置支持对接redis、mysql任务表,亦可扩展其他任务来源 -
BatchSpider
批次爬虫:可周期性的采集数据,自动将数据按照指定的采集周期划分。(如每7天全量更新一次商品销量的需求)
feapder对外暴露的接口类似scrapy,可由scrapy快速迁移过来。支持断点续爬、数据防丢、监控报警、浏览器渲染下载、海量数据去重等功能
文档地址
- 官方文档:https://feapder.com
- github:https://github.com/Boris-code/feapder
- 更新日志:https://github.com/Boris-code/feapder/releases
- 爬虫管理系统:http://feapder.com/#/feapder_platform/feaplat
环境要求:
- Python 3.6.0+
- Works on Linux, Windows, macOS
安装
From PyPi:
通用版
pip3 install feapder
完整版:
pip3 install feapder[all]
通用版与完整版区别:
- 完整版支持基于内存去重
完整版可能会安装出错,若安装出错,请参考安装问题
小试一下
创建爬虫
feapder create -s first_spider
创建后的爬虫代码如下:
import feapder
class FirstSpider(feapder.AirSpider):
def start_requests(self):
yield feapder.Request("https://www.baidu.com")
def parse(self, request, response):
print(response)
if __name__ == "__main__":
FirstSpider().start()
直接运行,打印如下:
Thread-2|2021-02-09 14:55:11,373|request.py|get_response|line:283|DEBUG|
-------------- FirstSpider.parse request for ----------------
url = https://www.baidu.com
method = GET
body = {'timeout': 22, 'stream': True, 'verify': False, 'headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36'}}
<Response [200]>
Thread-2|2021-02-09 14:55:11,610|parser_control.py|run|line:415|DEBUG| parser 等待任务...
FirstSpider|2021-02-09 14:55:14,620|air_spider.py|run|line:80|INFO| 无任务,爬虫结束
代码解释如下:
- start_requests: 生产任务
- parse: 解析数据
爬虫工具推荐
- 爬虫在线工具库:http://www.spidertools.cn
- 验证码识别库:https://github.com/sml2h3/ddddocr
微信赞赏
如果您觉得这个项目帮助到了您,您可以帮作者买一杯咖啡表示鼓励 🍹
也可和作者交个朋友,解决您在使用过程中遇到的问题
学习交流
知识星球:17321694 | 作者微信: boris_tm | QQ群号:750614606 |
加好友备注:feapder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
feapder-1.8.4b4.tar.gz
(190.5 kB
view details)
Built Distribution
feapder-1.8.4b4-py3-none-any.whl
(210.8 kB
view details)
File details
Details for the file feapder-1.8.4b4.tar.gz
.
File metadata
- Download URL: feapder-1.8.4b4.tar.gz
- Upload date:
- Size: 190.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8208a4e31f8b0ff79954d99fe609aed9d84e12ae6bbf48415332b0985497fda6 |
|
MD5 | 21261a9786b4560efd8d63da5a1048e1 |
|
BLAKE2b-256 | 9827c3b39c9577279e4ff50a1369f6fc222439ddc0c4bd7e514167dd2f5f38cc |
Provenance
File details
Details for the file feapder-1.8.4b4-py3-none-any.whl
.
File metadata
- Download URL: feapder-1.8.4b4-py3-none-any.whl
- Upload date:
- Size: 210.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5df19b1e7f50b45f2fcae859a4c4510c75de2e3c7133373875953d170bc932ab |
|
MD5 | cd6a7950087f98c0a114b8a8e22eaddd |
|
BLAKE2b-256 | 93385c06a6a7b4ceebea6be0626d7eb3065ce85c4e3067e654acb5e65d0d818f |