返回顶部
f

firecrawl-local本地火爬

|

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

firecrawl-local

Firecrawl 本地技能

使用 v1 REST API 的自托管 Firecrawl 集成。首先测试连接性,执行抓取/爬取/映射操作,并自动处理异步爬取轮询。

设置(一次性操作)

bash
mkdir -p ~/.openclaw/skills/firecrawl-local
cp run.sh ~/.openclaw/skills/firecrawl-local/run.sh
chmod +x ~/.openclaw/skills/firecrawl-local/run.sh

脚本位于此技能文件夹的 scripts/run.sh 中——按上述方式复制到目标位置。

前置条件: 已安装 curl、jq。Firecrawl 在 localhost:3002 运行。

可选环境变量:
bash
export FIRECRAWLLOCALURL=http://localhost:3002 # 默认值
export FIRECRAWLAPIKEY=fc-your-key # 仅在启用认证时需要



命令

默认 — 抓取单个页面(仅需 URL,无需子命令)

bash firecrawl-local https://docs.example.com/api

抓取 — 显式操作,带格式选项

bash firecrawl-local scrape https://docs.example.com/api firecrawl-local scrape https://docs.example.com/api --formats markdown,html

映射 — 发现网站上的所有 URL

bash firecrawl-local map https://docs.example.com firecrawl-local map https://docs.example.com --limit 200

爬取 — 批量提取多个页面(异步,自动轮询)

bash firecrawl-local crawl https://docs.example.com firecrawl-local crawl https://docs.example.com --limit 30 --max-depth 2 firecrawl-local crawl https://docs.example.com --include /docs --exclude /blog

代理指令

何时使用每个命令

目标命令
获取单个 URL 的内容(最快)firecrawl-local <url>
发现存在哪些页面
map | | 获取单个 URL 的内容并控制格式 | scrape | | 摄取整个文档站点 | crawl | | RAG 流水线摄取 | map → 针对性 scrape 或 crawl |

最佳工作流程

文档 RAG 流水线:

  1. 1. map https://docs.example.com → 获取完整 URL 列表
  2. scrape <特定关键页面> → 针对性提取
  3. 将 markdown 传递给嵌入流水线

完整站点摄取:

  1. 1. crawl https://docs.example.com --limit 50 --max-depth 3
  2. 结果自动轮询并以 JSON 数组形式返回 {url, markdown}

参数

标志适用范围描述
--limit Nmap, crawl最大页面数(默认:crawl 为 50,map 为 500)
--max-depth N
crawl | 链接跟踪深度(默认:2) | | --include /path | crawl | 仅爬取匹配此路径前缀的 URL | | --exclude /path | crawl | 跳过匹配此路径前缀的 URL | | --formats list | scrape | 逗号分隔:markdown、html、rawHtml、links |

读取输出

  • - scrape:返回 {success, data: {markdown, html, metadata}}
  • map:返回 {success, links: [...]}
  • crawl:返回 {success, data: [{url, markdown, metadata}, ...]} ← 轮询完成后

失败信号及修复

错误原因修复
Local Firecrawl unavailable服务未运行启动 Firecrawl,检查端口 3002
success: false
URL 错误或被阻止 | 检查 URL 是否可访问,尝试 --formats html | | 空的 markdown 字段 | JS 渲染页面 | Firecrawl 处理大多数 JS——检查站点是否屏蔽爬虫 | | 爬取超时 | 站点过大 | 减少 --limit 或 --max-depth |

脚本参考

完整实现请参见 scripts/run.sh。关键设计决策:

  • - 健康检查使用 /health 端点,超时时间 3 秒
  • 仅在设置了 FIRECRAWLAPIKEY 时发送认证头
  • 爬取轮询每 5 秒重试一次,最多 60 次(5 分钟)
  • 所有参数通过 jq 传递,防止 JSON 中的 shell 注入

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 firecrawl-local-1776019561 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 firecrawl-local-1776019561 技能

通过命令行安装

skillhub install firecrawl-local-1776019561

下载

⬇ 下载 firecrawl-local v1.0.0(免费)

文件大小: 4.51 KB | 发布时间: 2026-4-13 10:18

v1.0.0 最新 2026-4-13 10:18
- Initial release of Firecrawl Local skill for web scraping and site crawling with a self-hosted Firecrawl instance.
- Supports commands for single-page scraping, site mapping, and async multi-page crawling with format and filtering options.
- Automatically detects Firecrawl availability and handles crawl polling.
- Easy command-line integration with robust parameterization (URL filtering, limits, depth, output format).
- Clear agent guidance for documentation ingestion and RAG pipeline workflows.

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

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

p2p_official_large
返回顶部