Crawlo
基于 asyncio 的现代化高性能 Python 异步爬虫框架
Python 3.10+ · 已适配 Python 3.14
✨ 快速开始(3步上手)
1. 安装
pip install crawlo
2. 创建爬虫
crawlo startproject myproject
cd myproject
crawlo genspider example example.com
3. 运行
crawlo run example
🚀 核心特性
⚡ 高性能异步架构
- 基于 asyncio + aiohttp/httpx/curl-cffi 多种协议下载器
- 智能并发控制,连接池复用,自动优化吞吐量
- 支持 HTTP/2、TLS 指纹模拟(绕过 JA3 检测)
🛡️ 强大的反反爬能力
- HybridDownloader:5 级检测优先级,自动切换协议/浏览器引擎
- Cloudflare 自动绕过:检测挑战页面后自动切换隐身浏览器
- 4 种浏览器下载器:Playwright / Camoufox / CloakBrowser / DrissionPage
- BROWSER_ 统一配置层*:一套参数覆盖所有浏览器下载器
- 自适应选择器:网站改版时自动重新定位元素(选择器自愈) — 使用指南 →
🤖 AI 集成(MCP Server)
- Claude / Cursor 直接调用 Crawlo 抓取能力
- 三种抓取模式:
basic(1-3s)→stealth(3-10s)→max-stealth(10s+) - 浏览器单例池:stealth/max-stealth 模式复用实例
- 结构化错误返回:区分
TIMEOUT/CONNECTION_ERROR等,含建议提示
📊 四级背压防线
- Engine 层请求生成控制 + QueueManager 策略驱动
- 智能增强:
IntelligentBackpressureCalculator+BackpressureMonitor
📬 多渠道通知系统
- 5 种渠道:钉钉 / 飞书 / 企业微信 / 邮件 / 短信
- 30+ 预定义模板,异步发送,消息去重 + 窗口限制
🔄 三种部署模式
| 模式 | 配置 | 协调机制 | 适用场景 |
|---|---|---|---|
| 内存模式 | RUN_MODE='standalone' QUEUE_TYPE='memory' |
无(单机自动退出) | 开发调试、快速验证 |
| 多节点协作 ⭐ | RUN_MODE='auto' QUEUE_TYPE='redis' |
竞争消费(BZPOPMIN) | 多机并发,可接受任务丢失 |
| 分布式系统 | RUN_MODE='distributed' QUEUE_TYPE='redis_stream' |
ACK + 心跳 + 故障转移 | 生产环境,任务可靠性高 |
📚 文档
| 你是? | 推荐阅读 |
|---|---|
| 新手 | 5分钟快速上手 → 安装指南 |
| 开发者 | 配置指南 → 调度指南 |
| 运维 | 三种部署模式详解 → 检查点系统 → 生产部署指南 |
📖 浏览完整文档
包含快速入门、使用指南、核心概念、API 参考、实战案例、FAQ 等全部内容。
💡 示例项目
查看 examples/ 目录:
- 基础示例 - 快速上手
- 高级示例 - 复杂场景
- 生产级示例 - 可直接用于生产
🤝 贡献
欢迎提交 Issue 和 Pull Request!
📄 许可证
本项目采用 BSD 3-Clause 许可证 - 查看 LICENSE 文件了解详情。
⭐ 如果这个项目对你有帮助,请给我们一个 Star!
Metadata
Release files for crawlo 1.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crawlo-1.7.3.tar.gz | 4.0 MB | Without provenance | Details for crawlo-1.7.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crawlo-1.7.3-py3-none-any.whl | Python 3 | none | any | Details for crawlo-1.7.3-py3-none-any.whl |
Total release size: 4.8 MB
Release files / crawlo-1.7.3.tar.gz
| Download URL | crawlo-1.7.3.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea1b201eca6cef4d85e6a69ed83a0e460b0d6925645a847d63084116772489f8
|
|
BLAKE2b-256 checksum How to use checksums |
b458d049a32575ac3503b02deb5b32d630af4a8a728c6b92f238f3adb4922f55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / crawlo-1.7.3-py3-none-any.whl
| Download URL | crawlo-1.7.3-py3-none-any.whl |
|---|---|
| Size | 780.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65788f15f8557a17d60d58e4b006158a96cc106733bac9a72bc32a4b60b8656c
|
|
BLAKE2b-256 checksum How to use checksums |
87f82ff1e0f0b4dcdc91dfdab4e5e9140f29c8471b95b15a22e4b2aa10068f51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for crawlo 1.7.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.