微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🌐

智能单页抓取,纯净内容提取

Website Scraper Pro · v0.1.0
效率 安全 A 级 作者 youpele52 公开目录收录
995 下载 0 安装 3.1k 收藏 9 浏览

简介

基于 Crawl4AI 的本地单页爬虫工具,支持 clean markdown 提取、JS 渲染和确定性 JSON 输出,零 AI 内部处理。

原始描述

Run a local script to scrape a single web page into clean markdown or deterministic JSON with Crawl4AI. Use when: user needs direct page retrieval from a URL...

通过你的 Agent 添加

安装目录:website-scraper-pro/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/website-scraper-pro/
Codex CLI~/.codex/skills/website-scraper-pro/
DeepSeek Harness~/.agents/skills/website-scraper-pro/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

website-scraper-pro 是一款基于 Crawl4AI 的本地单页网页抓取工具,专为需要确定性、无 AI 处理的网页内容提取场景设计。用户通过 uv run 直接调用本地脚本,无需复杂环境配置。

主要功能模式

模式 命令示例 用途
默认 Markdown uv run ... <URL> 提取干净的文章、文档、博客正文
JS 渲染 --js 参数 处理客户端渲染的单页应用(SPA)
查询聚焦 --query "关键词" 按关键词过滤页面内容,非 LLM 实现
JSON 输出 --format json 返回结构化数据(title, url, markdown, links, metadata)

显著优点

  1. 零 AI 内部处理:纯确定性工具,输出可预测、可复现,适合对一致性要求高的工作流
  2. Clean Markdown 提取:自动过滤广告、导航、页脚等噪音,保留核心正文
  3. JS 感知能力:通过 Playwright 支持动态渲染页面,突破传统静态爬虫限制
  4. 隔离环境管理:uv 自动处理依赖,无需手动安装 crawl4ai
  5. 轻量单页专注:明确边界,避免过度设计,执行速度快

潜在局限

  • 单页限制:不支持站点级爬取、递归抓取、站点地图生成
  • 无认证支持:无法处理登录态、Cookie 或交互式表单提交
  • 非 RAG 工具:无内置向量索引、语义检索或 AI 问答能力
  • 首次配置成本:需一次性安装 Playwright Chromium 浏览器
  • 反爬依赖:无内置代理轮换、速率限制或验证码处理

适合人群

  • 开发者需要将特定网页内容接入自动化工作流
  • 内容运营人员批量提取文章正文用于后续处理
  • 研究者收集文档页面生成结构化数据集
  • 需确定性输出、拒绝 AI 幻觉的精度敏感场景

常规风险

风险类型 说明
法律合规 需遵守目标网站的 robots.txt 和使用条款,避免高频抓取触发封禁
内容变动 网页结构变更可能导致提取失败,需监控维护
依赖更新 Crawl4AI/Playwright 版本迭代可能影响兼容性

技能正文


name: website-scraper-pro description: "Run a local script to scrape a single web page into clean markdown or deterministic JSON with Crawl4AI. Use when: user needs direct page retrieval from a URL, JS-aware single-page scraping, or deterministic query-focused narrowing without internal AI processing. Invoke by reading this SKILL.md then running: uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py " homepage: https://github.com/unclecode/crawl4ai metadata: {"clawdbot":{"emoji":"🌐","requires":{"bins":["uv"]}}}

Skill: Website Scraper Pro

When to use

  • The user wants the content of a single web page from a specific URL.
  • The user wants clean markdown extracted from an article, docs page, blog post, or landing page.
  • The user wants a JS-aware scrape for a page that depends on client-side rendering.
  • The user wants deterministic query-focused narrowing of one page without using an AI model inside the skill.
  • The user wants structured JSON output with markdown, title, links, and metadata.

When NOT to use

  • The user wants a broad web search across multiple sources.
  • The user wants a site-wide crawl, recursive crawl, or multi-page extraction workflow.
  • The user wants AI summarization, synthesis, or answer generation inside the scraper itself.
  • The user wants authenticated browser automation or interactive form submission.

Commands

Scrape a page to markdown

uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py <URL>

Scrape a JS-heavy page

uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py <URL> --js

Scrape a page and narrow by query

uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py <URL> --query "<TEXT>"

Return deterministic JSON

uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py <URL> --format json

Examples

# Default markdown scrape
uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py https://example.com

# JS-aware scrape
uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py https://example.com --js

# Query-focused retrieval
uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py https://example.com --query "documentation examples"

# JSON output
uv run /root/.openclaw/workspace/skills/website-scraper-pro/src/main.py https://example.com --format json

Output

  • Default output is clean markdown for a single page.
  • --query keeps the output deterministic and non-LLM.
  • --format json returns deterministic JSON with fields such as title, url, markdown, links, and metadata when available.

Notes

  • This v1 does not use AI models internally. It is a deterministic retrieval tool only.
  • The skill is single-page only. It does not do deep crawling, site maps, schema extraction, or RAG.
  • uv run reads the inline # /// script dependency block in main.py and installs crawl4ai in an isolated environment.
  • If browser setup is missing, run one-time setup commands such as:
    • uv run --with crawl4ai crawl4ai-setup
    • uv run --with crawl4ai python -m playwright install chromium
  • Do NOT use web search for this workflow when a direct URL is available.
  • Call uv run src/main.py directly as shown above.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

web-scrapingcrawl4aimarkdown-extractionbrowser-automationdata-pipelinedeterministic-outputplaywright

同类 Skill