Skip to main content

Crawlo: A high-performance asynchronous Python web crawling framework with distributed support.。

Project description

Crawlo Logo

Crawlo

基于 asyncio 的现代化高性能 Python 异步爬虫框架

Python 3.11+ · 已适配 Python 3.14

快速开始核心特性文档示例

✨ 快速开始(3步上手)

1. 安装

pip install crawlo

2. 创建爬虫

crawlo startproject myproject
cd myproject
crawlo genspider example example.com

3. 运行

crawlo run example

👉 查看5分钟快速上手教程 →


🚀 核心特性

⚡ 高性能异步架构

  • 基于 asyncio + aiohttp/httpx/curl-cffi 多种协议下载器
  • 智能并发控制,连接池复用,自动优化吞吐量
  • 支持 HTTP/2、TLS 指纹模拟(绕过 JA3 检测)

🛡️ 强大的反反爬能力

  • HybridDownloader:6 级检测优先级(请求标记 → URL 模式 → 域名 → 扩展名 → 默认),自动切换协议/浏览器引擎
  • Cloudflare 自动绕过:检测挑战页面后自动切换隐身浏览器
  • 5 种浏览器下载器:Playwright / Camoufox / CloakBrowser / DrissionPage / Chrome
  • BROWSER_ 统一配置层*:一套参数覆盖所有浏览器下载器
  • 自适应选择器:网站改版时自动重新定位元素(选择器自愈)

🤖 AI 集成(MCP Server)

  • Claude / Cursor 直接调用 Crawlo 抓取能力
  • 三种抓取模式:basic(1-3s)→ stealth(3-10s)→ max-stealth(10s+)
  • 浏览器单例池:stealth/max-stealth 模式复用实例,消除重复启动开销
  • 结构化错误返回:区分 TIMEOUT / CONNECTION_ERROR / STEALTH_UNAVAILABLE 等,含建议提示
  • spider 工具内置 delay 限流参数,保护目标站点

📊 四级背压防线

  • Engine 层:请求生成端控制(入队 + TaskManager 双维度检查)
  • QueueManager 层:策略驱动(QueueSizeStrategy / AdaptiveStrategy / CompositeStrategy
  • MemoryQueue 层:Mixin 委托 + 回退逻辑
  • 硬限制:队列满直接拒绝
  • 智能增强:IntelligentBackpressureCalculator + BackpressureMonitor 可选集成

📬 多渠通知系统

  • 5 种渠道:钉钉 / 飞书 / 企业微信 / 邮件 / 短信
  • 30+ 预定义模板:任务启停、异常告警、进度更新、数据库监控
  • 异步发送async_send_* 函数,run_in_executor 包装避免阻塞事件循环
  • 消息去重 + 窗口限制,防止通知风暴

🔄 灵活的配置模式

模式 适用场景 Redis 要求
Standalone 单机开发测试 不需要
Distributed 多节点分布式 必需
Auto 智能检测(推荐) 可选

👉 详细了解配置模式 →


📚 文档

🎯 按角色阅读

你是? 推荐阅读
新手 5分钟快速上手安装指南
开发者 配置指南调度指南
运维 配置模式详解检查点系统

📖 完整文档导航

👉 浏览完整文档 →


💡 示例项目

查看 examples/ 目录:

  • 基础示例 - 快速上手
  • 高级示例 - 复杂场景
  • 生产级示例 - 可直接用于生产

👉 查看所有示例 →


🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 提交 Pull Request

📄 许可证

本项目采用 BSD 3-Clause 许可证 - 查看 LICENSE 文件了解详情。


⭐ 如果这个项目对你有帮助,请给我们一个 Star!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crawlo-1.6.6.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crawlo-1.6.6-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file crawlo-1.6.6.tar.gz.

File metadata

  • Download URL: crawlo-1.6.6.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for crawlo-1.6.6.tar.gz
Algorithm Hash digest
SHA256 70b93c874bbc616b0be6f08cdfc2c482bfdcfc8c7a62e097bdfdfeb72dea32af
MD5 55d34fd9578a47b67ec810850dbf0aee
BLAKE2b-256 8638eb1f07e5215fc1f632b573e7ee6b39b95b094be51cc822b8ace0c5d27e1c

See more details on using hashes here.

File details

Details for the file crawlo-1.6.6-py3-none-any.whl.

File metadata

  • Download URL: crawlo-1.6.6-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for crawlo-1.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3f78f89c632ad69d715d1cb0967daa763381d8dcf3c9b9ac46643001c55b2102
MD5 a327ea99f1384e5cfc8e2fcbbe3c5d93
BLAKE2b-256 b667cfc1f7ede43f56015164cebb444b630042cb1a119f5fa90934b8f33efbf6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page