Install
openclaw skills install smart-web-fetch-safe安全版智能网页内容获取技能。本地解析 + 可选远程清洗,隐私优先,Token 优化。
openclaw skills install smart-web-fetch-safe安全版智能网页内容获取技能,隐私优先,支持本地解析和远程清洗两种模式。
⚠️ 隐私提示:
# 本地解析模式(默认,隐私安全)
python3 skills/smart-web-fetch-safe/scripts/fetch.py "https://example.com/article"
# 远程清洗模式(更节省 Token,但数据经过第三方)
python3 skills/smart-web-fetch-safe/scripts/fetch.py "https://example.com/article" --remote
# 指定最大字符数
python3 skills/smart-web-fetch-safe/scripts/fetch.py "https://example.com/article" --max-chars 5000
# 组合使用
python3 skills/smart-web-fetch-safe/scripts/fetch.py "https://example.com/article" --remote --max-chars 3000
python3 skills/smart-web-fetch-safe/scripts/fetch.py "https://example.com/article" --json
| 变量 | 默认值 | 说明 |
|---|---|---|
| ALLOWED_DOMAINS | * | 允许访问的域名,用逗号分隔 |
| MAX_CHARS | 10000 | 最大返回字符数 |
| DEFAULT_MODE | local | 默认模式:local(本地)或 remote(远程) |
export ALLOWED_DOMAINS="example.com,github.com,wikipedia.org"
export MAX_CHARS=5000
export DEFAULT_MODE=local
| 特性 | 本地解析 (local) | 远程清洗 (remote) |
|---|---|---|
| 隐私 | ✅ 完全本地 | ⚠️ 数据经第三方 |
| Token 优化 | ✅ 基础优化 | ✅ 深度优化 50-80% |
| 速度 | 较快 | 依赖网络 |
| 依赖 | beautifulsoup4, requests | 无额外依赖 |
pip install beautifulsoup4 requests
开发中。