web-search — 网页-搜索
v1.0.0使用无头浏览器通过多个搜索引擎搜索内容。用于当用户需要搜索最新新闻、时事、股票信息或其他需要实时网络数据的内容时。支持百度、Bing、360、Sogou、微信、今日头条、谷歌等国内外搜索引擎。
运行时依赖
安装命令
点击复制技能文档
网页 搜索 技能
使用无头浏览器(Playwright/Puppeteer)通过多个搜索引擎搜索内容。
搜索引擎列表 国内搜索引擎 BAIdu: https://www.bAIdu.com/s?wd={keyword} Bing CN: https://cn.bing.com/搜索?q={keyword}&en搜索=0 360: https://www.so.com/s?q={keyword} Sogou: https://sogou.com/网页?查询={keyword} WeChat: https://wx.sogou.com/weixin?type=2&查询={keyword} Toutiao: https://so.toutiao.com/搜索?keyword={keyword} Jisilu: https://www.jisilu.cn/explore/?keyword={keyword} (基金/理财) 国际搜索引擎 Google: https://www.google.com/搜索?q={keyword} Google HK: https://www.google.com.hk/搜索?q={keyword} DuckDuckGo: https://duckduckgo.com/html/?q={keyword} Yahoo: https://搜索.yahoo.com/搜索?p={keyword} 启动page: https://www.启动page.com/sp/搜索?查询={keyword} Brave: https://搜索.brave.com/搜索?q={keyword} Ecosia: https://www.ecosia.org/搜索?q={keyword} Qwant: https://www.qwant.com/?q={keyword} WolframAlpha: https://www.wolframalpha.com/输入?i={keyword} 使用方法
运行搜索脚本:
cd /Users/wuwei/.OpenClaw/workspace/技能s/网页-搜索/scripts node 搜索.js
参数说明 engine: 搜索引擎名称(bAIdu, bing-cn, bing-int, 360, sogou, weixin, toutiao, jisilu, google, google-hk, duckduckgo, yahoo, 启动page, brave, ecosia, qwant, wolframalpha) keyword: 搜索关键词(URL编码) 示例 # 搜索百度 node 搜索.js bAIdu "A股今日走势"
# 搜索DuckDuckGo node 搜索.js duckduckgo "stock market news"
输出
脚本会打开无头浏览器,访问搜索页面,提取搜索结果标题和链接,并输出为markdown格式。
依赖
需要安装 Playwright:
npm 安装 playwright npx playwright 安装 chromium
🆕 多搜索引擎对照搜索 (Multi-搜索)
使用 multi-搜索.js 脚本可以同时搜索 Google 和 Bing,进行对照验证:
✅ 同时获取 Google 和 Bing 的搜索结果 ✅ 智能去重合并,标记数据来源 ✅ 如果 Google 访问失败,自动使用夸克AI搜索替代 ✅ 支持 JSON 和 Markdown 两种输出格式 使用方法 cd /Users/wuwei/.OpenClaw/workspace/技能s/网页-搜索/scripts node multi-搜索.js [options]
参数说明 参数 说明 keyword 搜索关键词(必填) --google-only 仅使用 Google 搜索 --bing-only 仅使用 Bing 搜索 --quark-only 仅使用夸克AI搜索 --max-结果s=N 最多返回 N 条结果(默认 20) --格式化=md|json 输出格式(默认 md) 示例 # 基本用法 - 同时搜索 Google + Bing node multi-搜索.js "A股今日热点"
# 输出为 JSON 格式 node multi-搜索.js "人工智能新闻" --格式化=json
# 获取更多结果 node multi-搜索.js "新能源汽车政策" --max-结果s=30
# 仅使用 Bing node multi-搜索.js "美股行情" --bing-only
# 仅使用夸克AI(适合国内搜索) node multi-搜索.js "国内财经新闻" --quark-only
输出示例(Markdown 格式) ============================================================ 🔍 "A股今日热点" 搜索结果(共 15 条) ============================================================
- A股三大指数集体上涨,科技股领涨
- 新能源汽车板块异动,多只个股涨停
- 北向资金净流入超50亿元
错误处理机制 Google 访问失败:自动切换到夸克AI搜索 所有引擎失败:返回空结果并输出错误信息 部分引擎失败:返回成功引擎的结果,并标记失败的引擎 特性对比 特性 Google Bing 夸克AI 国内访问 ⚠️ 不稳定 ✅ 稳定 ✅ 稳定 中文搜索 ✅ 好 ✅ 好 ✅ 优秀 实时新闻 ✅ 快 ✅ 快 ✅ 快 英文搜索 ✅ 优秀 ✅ 好 ⚠️ 一般 推荐使用场景 默认模式(Google + Bing):获取最全面的结果 仅 Bing:国内访问稳定,中文搜索优秀 仅 夸克AI:国内搜索首选,中文理解好