<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>实战 - 标签 - cfanzp学习笔记</title>
    <link>https://cfanzp008.github.io/tags/%E5%AE%9E%E6%88%98/</link>
    <description>实战 - 标签 - cfanzp学习笔记</description>
    <generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>cfan.zp@qq.com (cfanzp)</managingEditor>
      <webMaster>cfan.zp@qq.com (cfanzp)</webMaster><lastBuildDate>Wed, 29 Apr 2026 17:06:45 &#43;0800</lastBuildDate><atom:link href="https://cfanzp008.github.io/tags/%E5%AE%9E%E6%88%98/" rel="self" type="application/rss+xml" /><item>
  <title>browser-use demo002 实战总结</title>
  <link>https://cfanzp008.github.io/browser-use-demo002-summary/</link>
  <pubDate>Wed, 29 Apr 2026 17:06:45 &#43;0800</pubDate>
  <author>作者</author>
  <guid>https://cfanzp008.github.io/browser-use-demo002-summary/</guid>
  <description><![CDATA[browser-use demo002 实战总结 背景 在上一篇介绍 browser-use 的文章中，我们了解了这个 AI 驱动的浏览器自动化工具的基本概念。本文通过一个实际的 demo002.py 示例，深入分析 browser-use 的实际运行效果，包括配置细节、执行流程和结果分析。
示例代码分析 demo002.py 是一个最小化的 browser-use 使用示例，核心代码如下：
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 import asyncio from browser_use import Agent, BrowserProfile from browser_use.llm import ChatOpenAI async def main(): # 1. 配置浏览器参数 browser_profile = BrowserProfile( headless=True, args=[ &#34;--no-sandbox&#34;, &#34;--disable-setuid-sandbox&#34;, &#34;--disable-dev-shm-usage&#34;, &#34;--disable-gpu&#34;, &#34;--remote-debugging-port=9222&#34;, # 强制 CDP 端口 ], ) # 2.]]></description>
</item>
</channel>
</rss>
