Files
crawl4zeroerr/1_零差云控官网爬虫方案.md
2026-01-29 17:29:14 +08:00

66 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 零差云控官网爬虫方案
## 项目概述
- **网页源**: https://www.zeroerr.cn/
- **目标**: 爬取官网所有子页面内容,生成 Markdown 和 Word 文档
- **用途**: 作为 RAGFlow 知识库,用于售前 AI 客服
## 代码结构
```
crawl/
├── main.py # 主入口
├── requirements.txt # 依赖
├── zeroerr_crawler/ # 爬虫模块
│ ├── __init__.py
│ ├── config.py # 配置文件(所有任务配置)
│ ├── base_crawler.py # 基础爬虫类
│ ├── product_crawler.py # 产品页专用爬虫
│ └── utils.py # 工具函数
└── output/ # 输出目录
```
## 爬取任务完成情况
| 任务 | 命令 | 篇数 | 状态 |
|------|------|------|------|
| 应用案例 | `python main.py case` | 14篇 | ✅ 完成 |
| 常见问题 | `python main.py issue` | 32篇 | ✅ 完成 |
| 企业新闻 | `python main.py news` | 11篇 | ✅ 完成 |
| 认证与资质 | `python main.py certification` | 10篇 | ✅ 完成 |
| 机器人关节 | `python main.py erob` | 11篇 | ✅ 完成 |
| 编码器 | `python main.py ecoder` | 7篇 | ✅ 完成 |
| 配件 | `python main.py tools` | 13篇 | ✅ 完成 |
| 关于我们 | `python main.py about` | 2篇 | ✅ 完成 |
| 服务与支持 | `python main.py support` | 1篇 | ✅ 完成 |
| 资料下载 | `python main.py download` | 1篇 | ✅ 完成 |
**总计: 102 篇文章**
## 使用方法
```bash
# 安装依赖
pip install -r requirements.txt
# 查看所有可用任务
python main.py --list
# 爬取单个任务
python main.py case
# 爬取多个任务
python main.py case issue news
# 爬取全部
python main.py
```
## 输出格式
- 每个分类生成一个汇总文档(`xxx_汇总.md``xxx_汇总.docx`
- 图片保存到对应分类的 `images/` 目录
- Word 文档中嵌入本地图片
## 待处理项目
- [ ] 报价与交期页面https://www.zeroerr.cn/inquiry/
- [ ] 快速交货与货期https://www.zeroerr.cn/stock/109.html