返回顶部
d

data-scraper数据采集器

Web page data collection and structured text extraction

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,322
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

data-scraper

data-scraper

Web数据抓取器 — 使用curl+解析技术从网页中提取结构化数据。轻量级,无需浏览器。支持HTML转文本、表格提取、价格监控和批量抓取。

适用场景

  • - 从网页中提取文本内容(文章、博客、文档)
  • 抓取产品价格、评论或列表
  • 监控页面变化(价格下降、新内容)
  • 从多个URL批量收集数据
  • 将HTML表格转换为结构化格式(JSON/CSV)

快速开始

bash

从URL提取可读文本


data-scraper fetch https://example.com/article

提取特定元素

data-scraper extract https://example.com --selector h2, .price

监控变化

data-scraper watch https://example.com/product --interval 3600

提取模式

文本模式(默认)

获取页面并提取可读内容,去除HTML标签、脚本和样式。类似阅读器模式。

bash
data-scraper fetch URL

输出:干净的markdown文本

选择器模式

针对特定CSS选择器进行精确提取。

bash
data-scraper extract URL --selector .product-title, .price, .rating

输出:匹配元素作为结构化数据

表格模式

将HTML表格提取为结构化格式。

bash
data-scraper table URL --index 0

输出:行对象的JSON数组(表头→值映射)

链接模式

从页面提取所有链接,支持可选过滤。

bash
data-scraper links URL --filter *.pdf

输出:过滤后的绝对URL列表

批量抓取

bash

抓取多个URL


data-scraper batch urls.txt --output results/

带速率限制

data-scraper batch urls.txt --delay 2000 --output results/

urls.txt 格式:

https://site1.com/page
https://site2.com/page
https://site3.com/page

变化监控

bash

监控变化,差异时发出警报


data-scraper watch URL --selector .price --interval 3600

与之前的快照比较

data-scraper diff URL

快照存储在 data-scraper/snapshots/ 目录中,带有时间戳。检测到变化时通过notification-hub发出警报。

输出格式

格式标志用途
文本--format text阅读、摘要
JSON
--format json | 数据处理 | | CSV | --format csv | 电子表格 | | Markdown | --format md | 文档编写 |

请求头与认证

bash

自定义请求头


data-scraper fetch URL --header Authorization: Bearer TOKEN

基于Cookie的认证

data-scraper fetch URL --cookie session=abc123

覆盖User-Agent

data-scraper fetch URL --ua Mozilla/5.0...

速率限制与伦理

  • - 默认:每个域名每秒1个请求
  • 设置 --polite 标志时尊重 robots.txt
  • 可配置请求间隔延迟
  • 遇到429(请求过多)时停止并退避

错误处理

错误行为
404记录并跳过
403/401
警告需要认证 | | 429 | 指数退避(最多重试3次) | | 超时 | 使用更长的超时时间重试一次 | | SSL错误 | 发出警告,可选择使用 --insecure 继续 |

集成

  • - web-claude:当web_fetch不足时作为备用方案
  • competitor-watch:将抓取的数据输入竞争对手分析
  • seo-audit:抓取竞争对手页面进行SEO对比
  • performance-tracker:从公开资料收集社交指标

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 data-scraper-1776419994 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 data-scraper-1776419994 技能

通过命令行安装

skillhub install data-scraper-1776419994

下载

⬇ 下载 data-scraper v1.0.0(免费)

文件大小: 5.7 KB | 发布时间: 2026-4-17 19:01

v1.0.0 最新 2026-4-17 19:01
Initial release of data-scraper.

- Extract structured data from web pages using curl, no browser required.
- Supports HTML-to-text conversion, table extraction, price monitoring, and batch scraping.
- Multiple extraction modes: readable text, CSS selectors, tables, and link lists.
- Change monitoring with snapshots, diffing, and notifications.
- Flexible output formats: text, JSON, CSV, and Markdown.
- Customizable headers, cookies, rate limiting, and robots.txt respect with `--polite`.
- Integration with related skills for broader data workflows.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部