google-search-browser-use

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Search Browser Use

Google Search Browser Use

Overview

概述

Run Google searches with
browser-use
(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)的出现。

Prerequisites

前提条件

Before running the search, ensure the environment is ready:
  1. Check Installation: Verify if
    browser-use
    is available in the current PATH.
    bash
    which browser-use
  2. Install if Missing: If not found, install it using pip.
    bash
    python3 -m pip install --user browser-use
  3. 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
在运行搜索之前,请确保环境已准备就绪:
  1. 检查安装情况: 验证当前PATH中是否存在
    browser-use
    bash
    which browser-use
  2. 缺失时进行安装: 如果未找到,请使用pip进行安装。
    bash
    python3 -m pip install --user browser-use
  3. 定位二进制文件: 如果安装后仍无法找到该命令,它很可能位于用户的本地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
undefined

Example (adjust based on 'python3 -m site --user-base' output):

示例(根据
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
undefined

Check 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>
undefined
browser-use --browser real click <index>
undefined

3) Extract or Summarize

3) 提取或总结

  • Goal: Provide a short summary (3-6 bullets) with source citations.
  • Fallback: If
    browser-use
    struggles with parsing, use
    curl
    with Jina AI for a text-friendly version:
    bash
    curl -L "https://r.jina.ai/https://example.com"
  • 目标: 提供带有来源引用的简短摘要(3-6个要点)。
  • 备选方案: 如果
    browser-use
    解析遇到问题,请结合
    curl
    与Jina AI获取更易读的文本版本:
    bash
    curl -L "https://r.jina.ai/https://example.com"

4) Close the Session

4) 关闭会话

bash
browser-use close
bash
browser-use close

Troubleshooting

故障排除

  • CAPTCHAs: If encountered, solve them manually in the open browser window.
  • Path Issues: If
    browser-use
    cannot be called directly, always prefer finding the path via
    python3 -m site --user-base
    rather than guessing.
  • Connection: Ensure no VPN/Proxy is blocking Google results if timeouts occur.
  • 验证码(CAPTCHA): 如果遇到验证码,请在打开的浏览器窗口中手动解决。
  • 路径问题: 如果无法直接调用
    browser-use
    ,请始终通过
    python3 -m site --user-base
    查找路径,而非自行猜测。
  • 连接问题: 如果出现超时,请确保没有VPN/代理拦截Google搜索结果。