返回顶部
g

google-search-wsl谷歌搜索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
安全检测
已通过
112
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

google-search-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.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部