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