闲社服务运行正常AI智能体自动化平台
g

谷歌搜索WSL

技能标识:google-search-wsl

Google search via Chrome browser in WSL environment. Use when user needs web search, news lookup, or information retrieval. Suitable for: (1) trending news search, (2) information lookup, (3) web research. Automatically launches Chrome in WSL and controls it via CDP protocol.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
1
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

谷歌搜索WSL

Google搜索(WSL Chrome)

通过WSL中的Chrome浏览器执行Google搜索。

前置条件

  • - 在WSL中安装google-chrome-stable或google-chrome
  • 具备WSLg功能(或已配置X11转发)
  • 启用OpenClaw浏览器工具

快速开始

1. 启动Chrome

运行启动脚本:

bash
bash ~/.openclaw/scripts/google-search-chrome.sh

或手动启动:

bash
export DISPLAY=:0
google-chrome-stable --remote-debugging-port=9222 \
--remote-allow-origins=* \
--user-data-dir=$HOME/.openclaw/chrome-debug-profile \
--lang=zh-CN \
--disable-gpu \
--disable-dev-shm-usage &

2. 验证Chrome是否运行

bash
curl -s http://127.0.0.1:9222/json/version

应返回Chrome版本信息。

3. 使用浏览器工具进行搜索

browser action=open url=https://www.google.com/search?q=your+search+term profile=user
browser action=snapshot targetId=<返回的targetId>

故障排除

Chrome无法启动(缺少X服务器)

确保WSLg可用,或设置DISPLAY环境变量:

bash
export DISPLAY=:0

或检查WSLg


ls /mnt/wslg/.X11-unix/

端口9222已被占用

检查并终止占用进程:

bash
lsof -i :9222
kill

搜索结果为空

  • - 检查网络连接
  • 尝试使用代理(如果已配置HTTP_PROXY)
  • 等待页面完全加载后再进行快照

提示

  • - 搜索URL中的中文关键词会自动编码
  • 使用snapshot获取页面内容,然后提取所需信息
  • 新闻搜索请使用tbm=nws参数:/search?q=keyword&tbm=nws

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 google-search-wsl-1776114080 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 google-search-wsl-1776114080 技能

通过命令行安装

skillhub install google-search-wsl-1776114080

下载

⬇ 下载 google-search-wsl v1.0.0(免费)

文件大小: 2.79 KB | 发布时间: 2026-4-14 09:40

v1.0.0 最新 2026-4-14 09:40
- Initial release of google-search-wsl skill.
- Enables Google searches using Chrome browser within the WSL environment, controlled via CDP protocol.
- Designed for trending news, general information lookup, and web research tasks.
- Detailed setup instructions provided for launching Chrome in WSL and connecting via OpenClaw browser tool.
- Troubleshooting guidance included for common issues like Chrome startup and network problems.
- Tips added for effective searches, including news mode and handling of non-English keywords.
返回顶部