Web fetch cce
Claude Code 自我提升计划
npx -y skills add luochang212/cc-enhance --skill web-fetch-cceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
网页内容提取策略。当需要读取网页内容、爬取页面、提取文章正文、处理JS渲染页面、或绕过反爬限制时,必须使用此技能。三层工具选择:WebFetch(内置)→ Crawl4AI(JS渲染/反爬)→ 原生 Playwright(兜底降级)。
SKILL.md
3.4 KB, as published. Nobody here has run it
来自 cc-enhance。
-cce后缀表示此技能由 cc-enhance 项目安装,避免与本地同名技能冲突。
Web Fetch
搜索拿到 URL 之后,把页面内容提取为 Claude 可读的格式。
工具选择
| 工具 | 适用场景 | 格式 |
|---|---|---|
WebFetch | 静态页面、文档、博客 | HTML → Markdown |
| Crawl4AI | JS 渲染、反爬、结构化提取 | Playwright → Markdown / JSON |
| 原生 Playwright | Crawl4AI 超时/被检测时的降级 | inner_text 纯文本 |
策略
- 优先
WebFetch。内置、<1s、零依赖。覆盖 90% 的页面。 - Crawl4AI 处理 JS 重/反爬页。Markdown 质量好,
magic=True解微信。 - 原生 Playwright 兜底。当 Crawl4AI 超时(阮一峰)或被检测时,手动控制
wait_until策略。
对比
| WebFetch | Crawl4AI | 原生 Playwright | |
|---|---|---|---|
| 速度 | <1s | 2-4s | 1-5s |
| JS 渲染 | 否 | 是 | 是 |
| 输出质量 | 可用 | 丰富 Markdown | 纯文本 |
| 反爬 | 否 | magic/undetected | 手动注入 |
| 灵活性 | 无 | 中 | 高(wait_until、stealth) |
| 适合 | 90% 日常 | JS 重/反爬页 | Crawl4AI 搞不定时 |
参考
- references/crawl4ai.md — Crawl4AI 部署与使用、中国站点实测矩阵
- references/playwright.md — 原生 Playwright 降级方案
环境依赖
| 依赖 | 用途 | 安装方式 | 磁盘 | 必需 |
|---|---|---|---|---|
| Python 环境 + Crawl4AI | JS 渲染、反爬绕过 | 见下方「Python 环境检测」 | ~300MB | 否 |
| 无(WebFetch 内置) | 静态页面首选,零依赖 | — | 0 | 否 |
Python 环境检测
按以下顺序检查,任一项满足即可跳过安装:
conda --version→ 已有 conda,直接用 conda 创建环境uv --version→ 已有 uv,用uv venv && uv pip installpython3 --version→ 已有 python3,用venv + pip
若都没有,按优先级推荐安装:
安装后执行:
中国大陆使用镜像加速(腾讯云 / 阿里云二选一):
# conda
conda create -n crawl4ai python=3.13 -y && conda activate crawl4ai
pip install -i https://mirrors.cloud.tencent.com/pypi/simple/ crawl4ai # 腾讯云
pip install -i https://mirrors.aliyun.com/pypi/simple/ crawl4ai # 阿里云
playwright install chromium
# uv
uv venv && source .venv/bin/activate
uv pip install -i https://mirrors.cloud.tencent.com/pypi/simple/ crawl4ai # 腾讯云
uv pip install -i https://mirrors.aliyun.com/pypi/simple/ crawl4ai # 阿里云
playwright install chromium
# venv
python3 -m venv venv && source venv/bin/activate
pip install -i https://mirrors.cloud.tencent.com/pypi/simple/ crawl4ai # 腾讯云
pip install -i https://mirrors.aliyun.com/pypi/simple/ crawl4ai # 阿里云
playwright install chromium