关于 firecrawl-web
firecrawl-web 是通过 Firecrawl API 获取和处理网页的技能,支持读取页面、截图、结构化提取、搜索和爬取。
主要功能
- 01将网页提取为 Markdown
- 02截取完整页面
- 03按 JSON Schema 提取数据
- 04搜索网页
- 05爬取文档站点
适用场景
- 01去除导航干扰并阅读网页
- 02截取页面以供查看
- 03收集结构化产品信息
- 04在线查找最新信息
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ bexgboost/ firecrawl-claude-code-skill --skill firecrawl-web安装后在 Claude Code 中输入/firecrawl-web确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdrequirements.txt.gitignorefc.py详细介绍
Firecrawl 网页技能
此技能通过 Firecrawl 的 API 提供网页访问功能。
脚本位置
所有命令均使用捆绑脚本: ~/.claude/skills/firecrawl-web/fc.py
获取页面内容
将任意网页抓取为整洁的 Markdown:
python3 ~/.claude/skills/firecrawl-web/fc.py markdown "https://example.com"
若要获得更整洁的输出,不包含导航和页脚:
python3 ~/.claude/skills/firecrawl-web/fc.py markdown "https://example.com" --main-only
截取屏幕截图
截取整页屏幕截图:
python3 ~/.claude/skills/firecrawl-web/fc.py screenshot "https://example.com" -o page.png
提取结构化数据
使用 JSON 架构提取特定数据。请先创建架构文件:
{
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"},
"features": {"type": "array", "items": {"type": "string"}}
}
}
然后提取:
python3 ~/.claude/skills/firecrawl-web/fc.py extract "https://example.com/product" --schema schema.json
添加提示词以提高准确度:
python3 ~/.claude/skills/firecrawl-web/fc.py extract "https://example.com/product" --schema schema.json --prompt "Extract the main product details"
搜索网页
搜索最新信息:
python3 ~/.claude/skills/firecrawl-web/fc.py search "Python 3.13 new features"
限制结果数量:
python3 ~/.claude/skills/firecrawl-web/fc.py search "latest React documentation" --limit 3
抓取文档
抓取文档站点,以了解新的框架:
python3 ~/.claude/skills/firecrawl-web/fc.py crawl "https://docs.newframework.dev" --limit 30
将页面保存到目录:
python3 ~/.claude/skills/firecrawl-web/fc.py crawl "https://docs.example.com" --limit 50 --output ./docs
每个页面消耗 1 个点数。请设置合理的上限,以免耗尽配额。
评论
支持 Markdown