← Back to Skills Marketplace
zenyang-x

DoubaoChatObtain

by ZenYang-X · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
43
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install doubaochatobtain
Description
读取豆包(Douyin/Doubao)对话页面的完整全文内容。用于读取豆包对话帖子(如 https://www.doubao.com/thread/xxx ),解决虚拟滚动容器导致的"只能读取第一屏"问题,提取完整文本保存到本地文件。此 Skill 应在用户分享豆包对话链接或要求读取豆包页面时触发。豆包页面采用虚...
README (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 工具浏览,确认关键段落位置后再进行后续分析。
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install doubaochatobtain
  3. After installation, invoke the skill by name or use /doubaochatobtain
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug doubaochatobtain
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is DoubaoChatObtain?

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

How do I install DoubaoChatObtain?

Run "/install doubaochatobtain" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is DoubaoChatObtain free?

Yes, DoubaoChatObtain is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does DoubaoChatObtain support?

DoubaoChatObtain is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created DoubaoChatObtain?

It is built and maintained by ZenYang-X (@zenyang-x); the current version is v1.0.0.

💬 Comments