Install
openclaw skills install web-crawler网页爬虫工具,支持静态和动态页面爬取、媒体下载、反爬虫规避。激活条件:用户提到爬虫、爬取、crawler、scraper、抓取网页、下载媒体
openclaw skills install web-crawler通用网页爬虫,可处理各种类型网站,包括带防护机制或动态渲染的页面。
cd /home/node/.openclaw/workspace/web-crawler
# 爬取页面(需要先 cd 到项目目录)
node -e "
const crawler = require('./src/index.js');
const c = new crawler({maxPages: 1});
c.crawl('https://example.com').then(r => console.log(r.title));
"
编辑 config/default.json:
crawling.maxDepth - 最大爬取深度crawling.maxPages - 最大页面数media.enabled - 启用媒体下载antiBot.proxyList - 代理列表 ["http://ip:port", ...]puppeteer.executablePath - Puppeteer 浏览器路径已配置代理:
代理故障自动降级到直接连接。
outputs/html/ - HTML文件outputs/text/ - 纯文本outputs/screenshots/ - 截图outputs/media/ - 媒体文件outputs/data.json - 结构化数据