360 Secure SkillHub
360 安全技能中心

Smart Crawler

企业级智能爬虫 Skill:通过 Python 脚本与 Playwright/Selenium 动态渲染抓取网页,支持代理切换、User-Agent 轮换、XPath/CSS/Regex 数据提取、去重清洗与 Redis 分布式队列,并附带示例与单元测试。

kaiyuelv
kaiyuelv
热度 89.45
最近更新 2026-05-11 17:33:24
分类:数据依赖:代码执行 / 联网浏览搜索 / 第三方 API应用场景:数据处理 / 自动化脚本 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add smart-crawler
Metadata
name
smart-crawler
description
智能爬虫工具 - 企业级数据采集与反爬虫处理 | Smart Web Crawler - Enterprise data collection with anti-detection
homepage
https://github.com/openclaw/smart-crawler
category
data-collection
tags
["crawler","scraping","data-collection","playwright","selenium","automation"]

Smart Crawler - 智能爬虫工具

企业级数据采集解决方案,支持智能反爬虫处理、分布式爬取和数据清洗。

核心功能

功能模块 说明
智能爬虫引擎 基于 Playwright/Selenium 的动态渲染爬取
反爬虫处理 自动切换 User-Agent、代理池、请求频率控制
数据提取 XPath/CSS Selector/Regex 多模式数据提取
分布式支持 Redis 队列支持的分布式爬取
数据清洗 自动去重、格式标准化、敏感信息过滤

快速开始

from scripts.crawler_engine import CrawlerEngine

# 创建爬虫引擎
crawler = CrawlerEngine(use_proxy=True, headless=True)

# 爬取网页
result = crawler.crawl('https://example.com', 
                       extract_rules={'title': '//h1/text()',
                                     'content': '//div[@class="content"]//p/text()'})
print(result)

安装

pip install -r requirements.txt
playwright install

项目结构

smart-crawler/
├── SKILL.md                 # Skill说明文档
├── README.md                # 完整文档
├── requirements.txt         # 依赖列表
├── scripts/                 # 核心模块
│   ├── crawler_engine.py    # 爬虫引擎
│   ├── proxy_manager.py     # 代理管理器
│   ├── data_extractor.py    # 数据提取器
│   └── anti_detection.py    # 反检测模块
├── examples/                # 使用示例
│   └── basic_usage.py
└── tests/                   # 单元测试
    └── test_crawler.py

运行测试

cd tests
python test_crawler.py