← 返回 Skills 市场
zenyang-x

DoubaoChatObtain

作者 ZenYang-X · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
43
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install doubaochatobtain
功能描述
读取豆包(Douyin/Doubao)对话页面的完整全文内容。用于读取豆包对话帖子(如 https://www.doubao.com/thread/xxx ),解决虚拟滚动容器导致的"只能读取第一屏"问题,提取完整文本保存到本地文件。此 Skill 应在用户分享豆包对话链接或要求读取豆包页面时触发。豆包页面采用虚...
使用说明 (SKILL.md)

DoubaoChatObtain

读取豆包对话页面完整全文。

核心原理

豆包页面的 body 设置了 overflow: hiddenwindow.scroll 无效。真正的滚动区域是一个 div.fixed 容器,页面内容通过虚拟滚动加载(只渲染可视区域附近的内容)。直接用 element.innerText 可以一次性绕过虚拟滚动,提取已渲染的全部文本。

前置依赖

需安装 agent-browser(Node.js CLI 浏览器自动化工具):

npm install -g agent-browser
# 或项目级安装
npm install agent-browser

验证安装:

npx agent-browser --version

执行步骤

第一步:用 agent-browser 打开目标 URL

npx agent-browser open "\x3C豆包对话URL>"

第二步:执行 JS 提取全文

在豆包页面内执行以下 JS,通过 getComputedStyle 遍历所有元素,找到真正的滚动容器,然后一次性提取 innerText

npx agent-browser eval --json "(() => { const c = [...document.querySelectorAll('div')].find(el => { const s = getComputedStyle(el); return (s.overflowY==='auto'||s.overflowY==='scroll') && el.scrollHeight > el.clientHeight; }); return c ? c.innerText : 'NOT_FOUND'; })();" > /tmp/doubao_raw.json

关键点--json 参数返回标准 {"success":true,"data":{"origin":"...","result":"文本"}} 格式,避免解析转义字符的问题。

第三步:解析并保存

使用内置脚本解析 JSON 并写入文件:

python3 scripts/parse_doubao.py --input /tmp/doubao_raw.json --output ./豆包对话全文.txt

已知限制与注意事项

  1. 需要浏览器已打开豆包页面:每次读取新对话前,需先 agent-browser open \x3Curl>
  2. 非登录用户:可能看到"开始试用豆包"弹窗,读取内容通常不受影响。
  3. 内容提取时机:等待页面完全加载后再执行 JS,尤其是长对话帖子。
  4. 多页对话:某些帖子可能有翻页,滚动到底部后再执行 JS 提取。
  5. eval --json 返回 NOT_FOUND:说明页面未完全加载,滚动到底部后重试。

输出

  • 文件保存路径:/Users/zen/WorkBuddy/Claw/中登日记自动化项目/豆包对话全文.txt
  • 字数通常在 5 万~15 万字之间(取决于对话长度)
  • 建议:提取完成后,对照原文用 Read 工具浏览,确认关键段落位置后再进行后续分析。
安全使用建议
Install only if you are comfortable using agent-browser and saving Doubao conversation text on your machine. Treat the extracted files as potentially private, review the output path before running, and delete /tmp/doubao_raw.json and the generated text file when you no longer need them.
能力评估
Purpose & Capability
The stated purpose is to capture full Doubao conversation text despite virtual scrolling, and the artifacts implement that through agent-browser DOM extraction plus a JSON parsing helper.
Instruction Scope
The activation scope is tied to Doubao conversation links or requests to read Doubao pages; the browser JavaScript reads text from the currently opened page and is not written as a general-purpose data scraper.
Install Mechanism
The skill asks users to install the external npm CLI agent-browser, including global installation as an option; this is disclosed and coherent with browser automation, but users should trust that dependency before installing it.
Credentials
Browser automation, DOM evaluation, and temporary/local text files are proportionate for extracting virtual-scroll chat content, though the output may contain private conversation data.
Persistence & Privilege
Persistence is disclosed: the workflow writes raw JSON to /tmp/doubao_raw.json and saves extracted text to a local output file. The script does not request elevated privileges, network upload, credential access, or background persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install doubaochatobtain
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /doubaochatobtain 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of doubao-chat-obtain: - Enables extraction of the complete text from Doubao (Douyin/Doubao) chat threads, bypassing virtual scrolling issues. - Utilizes agent-browser for automated browser control and DOM extraction via JavaScript. - Outputs extracted content to a local text file for further use. - Handles special cases where content is not fully loaded and provides retry instructions. - Includes clear setup and operational guidance for users.
元数据
Slug doubaochatobtain
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

DoubaoChatObtain 是什么?

读取豆包(Douyin/Doubao)对话页面的完整全文内容。用于读取豆包对话帖子(如 https://www.doubao.com/thread/xxx ),解决虚拟滚动容器导致的"只能读取第一屏"问题,提取完整文本保存到本地文件。此 Skill 应在用户分享豆包对话链接或要求读取豆包页面时触发。豆包页面采用虚... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 43 次。

如何安装 DoubaoChatObtain?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install doubaochatobtain」即可一键安装,无需额外配置。

DoubaoChatObtain 是免费的吗?

是的,DoubaoChatObtain 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

DoubaoChatObtain 支持哪些平台?

DoubaoChatObtain 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 DoubaoChatObtain?

由 ZenYang-X(@zenyang-x)开发并维护,当前版本 v1.0.0。

💬 留言讨论