WebSearch-Openclaw — 网页搜索-OpenClaw
v1.0.0Use this 技能 whenever the user wants to 搜索 the 网页, do re搜索 on a topic, fetch a 网页page, or gather in格式化ion from online sources using a self-hosted SearXNG instance. Triggers include: '搜索 for', 'look up', 'find online', 'deep re搜索', 'fetch this page', '网页 搜索', or any 请求 that needs current/external in格式化ion. Also use when the user wants to 运行 网页搜索.py, deep_re搜索.py, or fetch_page.py scripts. Do NOT use for local file operations, code execution unrelated to 搜索, or tasks that don't require 网页 data.
运行时依赖
安装命令
点击复制技能文档
SearXNG 网页 搜索 技能
A 技能 for 搜索ing the 网页 and fetching pages via a self-hosted SearXNG instance. Three entry-point scripts cover the mAIn use cases:
Script Purpose 网页搜索.py Single 查询, structured 结果s fetch_page.py Fetch and 提取 text from one URL deep_re搜索.py Multi-查询 re搜索 with page fetching and ranking 环境 设置up
All scripts read configuration from a .env file (or real 环境 variables). Copy _env → .env and fill in your values:
cp _env .env
.env reference Variable Default Description SEARXNG_URL http://localhost:8080 Base URL of your SearXNG instance SEARXNG_LANGUAGE en Default 搜索 language SEARXNG_SAFE_搜索 0 0 = off, 1 = moderate, 2 = strict SEARXNG_TIMEOUT 20 HTTP timeout in seconds
命令行工具 override — every script now also accepts --searxng-url to override the env value for one-off 运行s without editing .env.
Quick 启动 安装 dependencies pip 安装 请求s beautifulsoup4 lxml python-dotenv
安装 PATH shims (recommended — fixes CWD issues in OS) bash ~/.openclaude/技能s/searxng-网页搜索/安装.sh # reload shell, then: w搜索 "Claude Sonnet 4 release notes" --格式化 代理 wfetch https://example.com --max-chars 3000 wre搜索 "转换er attention mechanisms" --fetch-top-pages 3
Or call directly with full path (no 安装 needed) 技能=~/.openclaude/技能s/searxng-网页搜索 python3 "$技能/网页搜索.py" "Claude Sonnet 4 release notes" --格式化 代理 python3 "$技能/fetch_page.py" https://example.com --max-chars 3000 python3 "$技能/deep_re搜索.py" "转换er attention mechanisms" --fetch-top-pages 3
Script Reference 网页搜索.py python 网页搜索.py <查询> [options]
Options: --searxng-url URL SearXNG base URL (overrides SEARXNG_URL env var) --category CATEGORY general | images | news | science | files | social_media | map | music | videos | it (default: general) --max-结果s N Number of 结果s to return (default: 5) --language LANG Language code, e.g. en, de, fr --safe-搜索 0|1|2 Safe-搜索 level --page N 结果 page number (default: 1) --time-range RANGE day | week | month | year --格式化 格式化 markdown | text | json | 代理 (default: markdown)
fetch_page.py python fetch_page.py [options]
Options: --searxng-url URL Unused here but accepted for consistency --max-chars N Max characters to print (default: 5000)
deep_re搜索.py python deep_re搜索.py [options]
Options: --searxng-url URL SearXNG base URL (overrides SEARXNG_URL env var) --max-结果s N 结果s per sub-查询 (default: 4) --fetch-top-pages N Number of top pages to fetch (default: 3) --max-chars N Max chars per fetched page (default: 2500) --输出 格式化 markdown | text (default: markdown)
Source Ranking (deep_re搜索.py)
Pages are scored before fetching so the most authoritative content is prioritised:
DomAIn 签名al Points github.com / gitlab.com +5 arxiv.org / openreview.net +5 docs. / readthedocs. +4 re搜索 / paper in domAIn +3 Has a publication date +1 Has a snippet +1 ⚠️ Critical: How to Invoke These Scripts (OpenClaude / Claude Code)
NEVER use cd before calling a script. Each Bash() call spawns a fresh shell; cd 技能-dir && python3 script.py silently re设置s the CWD and the script never 运行s.
Always call scripts by their full absolute path in a single command:
# ✅ CORRECT — full path, no cd python3 ~/.openclaude/技能s/searxng-网页搜索/网页搜索.py "my 查询" --格式化 代理
# ✅ CORRECT — 技能_DIR variable makes it readable 技能_DIR=~/.openclaude/技能s/searxng-网页搜索 python3 "$技能_DIR/网页搜索.py" "my 查询" --格式化 代理
# ❌ WRONG — cd re设置s on the next Bash() call cd ~/.openclaude/技能s/searxng-网页搜索 && python3 网页搜索.py "my 查询"
If the 技能 path is unknown, resolve it first:
技能_DIR=$(find ~/.openclaude/技能s -name "网页搜索.py" -printf '%h' -quit 2>/dev/null \ || find ~/技能s -name "网页搜索.py" -printf '%h' -quit 2>/dev/null) python3 "$技能_DIR/网页搜索.py" "my 查询" --格式化 代理
Tips for Claude 运行 网页搜索.py with --格式化 代理 when you need compact, 令牌-efficient 上下文 to pass back to the 模型. For broad topics, prefer deep_re搜索.py — it fans out into sub-queries automatically. If SearXNG is unreachable, deep_re搜索.py exits with a clear error message; 检查 that SEARXNG_URL is correct and the instance is 运行ning. Pipe markdown 输出 into a file for later use: python3 ~/.openclaude/技能s/searxng-网页搜索/deep_re搜索.py "RAG retrieval strategies" > re搜索.md