WorkBuddy 浏览器自动化实战:用自然语言让浏览器替你打工并不只看表面做法,关键还要理解相关条件、限制和后续影响。
{"type":"doc","content":[{"type":"paragraph","attrs":{"id":"c3620d76f28f4a4586efd899dadabd37","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"image","attrs":{"id":"7e770647234f4cc6a463a0c8a2075acb","src":"https://workbuddy-demo-d9g04qom0c1efe722-1459940040.tcloudbaseapp.com/article-images/11-browser-automation-cover.png","extension":"png","align":"center","alt":"","showAlt":false,"href":"","boxShadow":"","width":504,"aspectRatio":"1.300676","status":"success","showText":true,"isPercentage":false,"percentage":0,"isHoverDragHandle":false}}]},{"type":"paragraph","attrs":{"id":"08b1d57e37154a8c859b2a2bc7107835","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"每天打开十几个网页、反复登录、手动抄录数据、定时去某个后台点一下——这些动作不复杂,但极其消耗精力。WorkBuddy 的浏览器自动化能力,就是专门把这些"},{"type":"text","text":"""},{"type":"text","text":"低价值重复操作"},{"type":"text","text":"""},{"type":"text","text":"接管下来:你用中文说一句想要什么,智能体自己打开浏览器、定位元素、执行操作,最后把结果截图或整理好交还给你。"}]},{"type":"paragraph","attrs":{"id":"51f0094685924c168251ac85d03f1af7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"本篇以实战视角,带你跑通一条完整的浏览器自动化链路。"}]},{"type":"heading","attrs":{"id":"84b301e22e32432eac21f1d5e3bb0e26","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"一、它能做什么:先看清能力边界"}]},{"type":"paragraph","attrs":{"id":"286d1325bb364b88b62ea2653e4a6ce7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"浏览器自动化的本质,是让智能体像人一样操作真实浏览器(Chromium),而不是调用 API。这意味着只要人能在网页上点的,它基本都能做,但又比"},{"type":"text","text":"""},{"type":"text","text":"写脚本"},{"type":"text","text":"""},{"type":"text","text":"更省心——你不需要懂 XPath、不用管页面改版,只描述目标和意图即可。"}]},{"type":"paragraph","attrs":{"id":"1cfdd4ed8dfe4fb4b4e9137fd7f28667","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"image","attrs":{"id":"c73725c29b2d4adeb96a09b7c51dc2b0","src":"https://workbuddy-demo-d9g04qom0c1efe722-1459940040.tcloudbaseapp.com/article-images/11-browser-automation-cap.svg","extension":"svg","align":"center","alt":"","showAlt":false,"href":"","boxShadow":"","width":504,"aspectRatio":"1.300676","status":"success","showText":true,"isPercentage":false,"percentage":0,"isHoverDragHandle":false}}]},{"type":"paragraph","attrs":{"id":"46de3ed7172046de8d270f03ff3de53c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"核心能力可以归纳成六类:"}]},{"type":"paragraph","attrs":{"id":"e384364eb18349c8bc035c18f233940d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"网页抓取"},{"type":"text","text":":打开列表页、商品页、搜索结果,自动提取标题、价格、正文等结构化数据。"}]},{"type":"paragraph","attrs":{"id":"34e96b4cc66a4a7c815224d42a93ef0f","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"表单填写"},{"type":"text","text":":登录、搜索、提交信息,把多步填表流程一句话交代清楚。"}]},{"type":"paragraph","attrs":{"id":"eed0d42c36764199b20dd49583ffed18","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"截图取证"},{"type":"text","text":":整页或区域截图,把页面状态留存成可视化证据,方便核对与归档。"}]},{"type":"paragraph","attrs":{"id":"07ca60ae87ec41f98c63e8c8ff434cf8","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"定时巡检"},{"type":"text","text":":每天自动打开指定页面,检查是否更新、是否有异常、关键数值是否变化。"}]},{"type":"paragraph","attrs":{"id":"95073dc4bac3495082e765be4e1e00a3","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"跨站操作"},{"type":"text","text":":把多个站点的动作串成一条链路,比如"},{"type":"text","text":"""},{"type":"text","text":"在 A 站查价 → 到 B 站比价 → 在 C 站记录"},{"type":"text","text":"""},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"id":"adfed99ac87e41fd80a29eecf54c7285","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"本地托管更安全"},{"type":"text","text":":智能体运行在你本机的浏览器里,账号态和数据不出本地,比把密码交给第三方脚本更稳妥。"}]},{"type":"heading","attrs":{"id":"87d4b3452891413da5204c8e43b78b0e","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"二、工作流:从一句指令到定时循环"}]},{"type":"paragraph","attrs":{"id":"d30e394f2c8741d2ab5ffbff14226767","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"理解透了能力,再看它怎么跑。一条标准的浏览器自动化任务,内部是这样流动的:"}]},{"type":"paragraph","attrs":{"id":"09fa93b0e8764ddf8eb70b89a3c39361","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"image","attrs":{"id":"a03de1f844aa4c80923da7ad303de623","src":"https://workbuddy-demo-d9g04qom0c1efe722-1459940040.tcloudbaseapp.com/article-images/11-browser-automation-flow.svg","extension":"svg","align":"center","alt":"","showAlt":false,"href":"","boxShadow":"","width":504,"aspectRatio":"1.300676","status":"success","showText":true,"isPercentage":false,"percentage":0,"isHoverDragHandle":false}}]},{"type":"paragraph","attrs":{"id":"3916c322fb1b41abaf7ab75dd0bd050d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"自然语言"},{"type":"text","text":":你只描述"},{"type":"text","text":"""},{"type":"text","text":"目标"},{"type":"text","text":"""},{"type":"text","text":",例如"},{"type":"text","text":"""},{"type":"text","text":"每天早上 9 点打开某后台,截图首页并告诉我今日新增数量"},{"type":"text","text":"""},{"type":"text","text":"。"}]},{"type":"paragraph","attrs":{"id":"bb53228419ef48e59546022f3b7ad6a1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"智能定位"},{"type":"text","text":":智能体自己识别页面上的按钮、输入框、列表,不需要你提供选择器。"}]},{"type":"paragraph","attrs":{"id":"f8dca3290ced4f3486be6ca8d5b12f2b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"自动执行"},{"type":"text","text":":点击、输入、滚动、等待加载,按逻辑顺序完成操作。"}]},{"type":"paragraph","attrs":{"id":"bd727b85760242acaa40bfc02802c033","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"校验回传"},{"type":"text","text":":对结果做校验(是否登录成功、数据是否拿到),并把截图/摘要回传给你。"}]},{"type":"paragraph","attrs":{"id":"ffc8ac3bf7544b409ee0ead6f62c69ce","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"定时循环"},{"type":"text","text":":用 WorkBuddy 的自动化任务把这条流程固化,按每天/每周自动跑。"}]},{"type":"paragraph","attrs":{"id":"ba127d8fe80a4b689bac45d790a70a9d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"真正解放精力的,是第 5 步——一次配置,长期免维护。"}]},{"type":"heading","attrs":{"id":"31e7175e8e0448c9a35d76046dcd0a69","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"三、实战示例:三句话搭建一个"},{"type":"text","text":"""},{"type":"text","text":"每日巡检员"},{"type":"text","text":"""}]},{"type":"paragraph","attrs":{"id":"c4b16723b61f4877a27a84bc25dc72e4","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"下面用一个最小可复现的例子说明,不需要写任何代码:"}]},{"type":"blockquote","attrs":{"id":"53cf7d168a854cc7b1ab3e3139848116","textAlign":"inherit","isHoverDragHandle":false},"content":[{"type":"paragraph","attrs":{"id":"93b048f9ac8942e491de52e043b4d359","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"指令:打开 https://example.com/dashboard ,等待加载完成,整页截图保存到本地,并提取页面顶部的"},{"type":"text","text":"""},{"type":"text","text":"今日订单数"},{"type":"text","text":"""},{"type":"text","text":"文字发给我。"}]}]},{"type":"paragraph","attrs":{"id":"d68c5af5e8dc4c3eb5af4a0956c9605d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"智能体会:启动本机浏览器 → 访问该地址 → 等待网络空闲 → 截取整页 → 用视觉 语义读取顶部数字 → 把结果汇总返回。如果某天页面改了版、数字挪了位置,它依然能靠语义理解重新找到,而不像传统脚本那样直接报错崩溃。"}]},{"type":"paragraph","attrs":{"id":"240ae7beb3b149b785f01fecbddcf0fd","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"再进阶一点,把这条指令包进一个"},{"type":"text","text":"每日 09:00"},{"type":"text","text":" 的自动化任务,它就变成了一个永不疲倦的巡检员:你第二天早上直接收到截图和数值,异常一眼可见。"}]},{"type":"heading","attrs":{"id":"403cdb51a7c14745a4d73f112f7bfe6f","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"四、几个让它更稳的小技巧"}]},{"type":"paragraph","attrs":{"id":"b0b7ebc7db924cf9bbc02c0482530d41","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"明确"},{"type":"text","text":"""},{"type":"text","text":"完成标准"},{"type":"text","text":"""},{"type":"text","text":":与其说"},{"type":"text","text":"""},{"type":"text","text":"看看后台"},{"type":"text","text":"""},{"type":"text","text":",不如说"},{"type":"text","text":"""},{"type":"text","text":"确认登录成功且订单数大于 0,否则告警"},{"type":"text","text":"""},{"type":"text","text":"。目标越具体,结果越可控。"}]},{"type":"paragraph","attrs":{"id":"53091fe75ddb4194bde5059a5ba3829d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"给关键步骤留截图"},{"type":"text","text":":在易出错的位置(如登录页、验证码页)主动截图,事后排查事半功倍。"}]},{"type":"paragraph","attrs":{"id":"268e63664ef2410aba78228f96517589","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"敏感操作先限速"},{"type":"text","text":":涉及下单、删除等不可逆动作时,先让智能体只"},{"type":"text","text":"""},{"type":"text","text":"预览"},{"type":"text","text":"""},{"type":"text","text":"步骤并等你确认,再放开自动执行。"}]},{"type":"paragraph","attrs":{"id":"a2634172d201423c9de96da913dc7b98","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"用本地浏览器保安全"},{"type":"text","text":":账号、Cookie 都在你机器上,不要把高权限账号交给外部服务跑自动化。"}]},{"type":"heading","attrs":{"id":"ed67bc93e7094e38a7448a8efcadf207","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","text":"五、小结"}]},{"type":"paragraph","attrs":{"id":"0c51e90ce8b4492686fd4586364e3613","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"浏览器自动化不是新概念,但过去它属于"},{"type":"text","text":"""},{"type":"text","text":"会写代码的人"},{"type":"text","text":"""},{"type":"text","text":"。WorkBuddy 把它变成了"},{"type":"text","text":"""},{"type":"text","text":"会说中文的人"},{"type":"text","text":"""},{"type":"text","text":"也能用的能力:你描述目标,智能体执行并回传,再用自动化任务把流程固化成例行作业。"}]},{"type":"paragraph","attrs":{"id":"b1ae19dbeb3149eeb6ef72dbf95bf985","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"把那些占据你时间却毫无技术含量的网页点击,都交给它吧——你省下的每一分钟,都能拿去做更值得的事。"}]},{"type":"blockquote","attrs":{"id":"b3cddb2522854bcba711022d3e109779","textAlign":"inherit","isHoverDragHandle":false},"content":[{"type":"paragraph","attrs":{"id":"732474df7ef54e2aa432bbbac4920ebe","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"下一篇预告:把浏览器自动化和云开发(CloudBase)结合,做一个"},{"type":"text","text":"""},{"type":"text","text":"本地抓取 云端展示"},{"type":"text","text":"""},{"type":"text","text":"的上云实战。"}]}]}]}","createTime":1786284038,"ext":{"closeTextLink":0,"comment_ban":0,"description":"","focusRead":0},"favNum":0,"html":"","isOriginal":0,"likeNum":0,