google-search-browser-use
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Search Browser Use
Google Search Browser Use
Overview
概述
Run Google searches with (prefer real browser mode), open results, and extract the relevant snippets or page content. This skill leverages the user's existing browser session to reduce CAPTCHAs.
browser-use使用执行Google搜索(优先使用真实浏览器模式),打开搜索结果并提取相关片段或页面内容。该工具利用用户现有的浏览器会话来减少验证码(CAPTCHA)的出现。
browser-usePrerequisites
前提条件
Before running the search, ensure the environment is ready:
-
Check Installation: Verify ifis available in the current PATH.
browser-usebashwhich browser-use -
Install if Missing: If not found, install it using pip.bash
python3 -m pip install --user browser-use -
Locate Binary: If the command is still not found after installation, it is likely in the user's local bin directory. Retrieve the path dynamically:bash
python3 -m site --user-base # The binary is typically at <USER_BASE>/bin/browser-use
在运行搜索之前,请确保环境已准备就绪:
-
检查安装情况: 验证当前PATH中是否存在。
browser-usebashwhich browser-use -
缺失时进行安装: 如果未找到,请使用pip进行安装。bash
python3 -m pip install --user browser-use -
定位二进制文件: 如果安装后仍无法找到该命令,它很可能位于用户的本地bin目录中。动态获取路径:bash
python3 -m site --user-base # 二进制文件通常位于 <USER_BASE>/bin/browser-use
Workflow
工作流程
1) Launch a Google search (Real Browser Mode)
1) 启动Google搜索(真实浏览器模式)
Use the real browser to reuse the user’s logged-in session.
Option A: Standard Execution
bash
browser-use --browser real open "https://www.google.com/search?q=YOUR+QUERY"Option B: Explicit Path Execution
If Option A fails (command not found), use the full path found in Prerequisites:
bash
undefined使用真实浏览器复用用户已登录的会话。
选项A:标准执行
bash
browser-use --browser real open "https://www.google.com/search?q=YOUR+QUERY"选项B:指定路径执行
如果选项A执行失败(提示命令未找到),请使用前提条件步骤中找到的完整路径:
bash
undefinedExample (adjust based on 'python3 -m site --user-base' output):
示例(根据python3 -m site --user-base
的输出调整):
python3 -m site --user-base${HOME}/Library/Python/3.14/bin/browser-use --browser real open "https://www.google.com/search?q=YOUR+QUERY"
*(Note: Replace `3.14` with your current Python version if different)*${HOME}/Library/Python/3.14/bin/browser-use --browser real open "https://www.google.com/search?q=YOUR+QUERY"
*(注意:如果你的Python版本不同,请替换`3.14`)*2) Inspect results and parse
2) 检查结果并解析
Once the browser is open:
bash
undefined浏览器打开后:
bash
undefinedCheck current page state
检查当前页面状态
browser-use --browser real state
browser-use --browser real state
Click on a search result (use index from state output)
点击搜索结果(使用状态输出中的索引)
browser-use --browser real click <index>
undefinedbrowser-use --browser real click <index>
undefined3) Extract or Summarize
3) 提取或总结
- Goal: Provide a short summary (3-6 bullets) with source citations.
- Fallback: If struggles with parsing, use
browser-usewith Jina AI for a text-friendly version:curlbashcurl -L "https://r.jina.ai/https://example.com"
- 目标: 提供带有来源引用的简短摘要(3-6个要点)。
- 备选方案: 如果解析遇到问题,请结合
browser-use与Jina AI获取更易读的文本版本:curlbashcurl -L "https://r.jina.ai/https://example.com"
4) Close the Session
4) 关闭会话
bash
browser-use closebash
browser-use closeTroubleshooting
故障排除
- CAPTCHAs: If encountered, solve them manually in the open browser window.
- Path Issues: If cannot be called directly, always prefer finding the path via
browser-userather than guessing.python3 -m site --user-base - Connection: Ensure no VPN/Proxy is blocking Google results if timeouts occur.
- 验证码(CAPTCHA): 如果遇到验证码,请在打开的浏览器窗口中手动解决。
- 路径问题: 如果无法直接调用,请始终通过
browser-use查找路径,而非自行猜测。python3 -m site --user-base - 连接问题: 如果出现超时,请确保没有VPN/代理拦截Google搜索结果。