Install
openclaw skills install douyin-web-controlUse this skill when the user wants an Agent to operate Douyin web through the douyin-web CLI, including launching or focusing Douyin, login checks, feed navigation, search, current video info, playback control, comments, likes, following the current author, favorites, sharing, danmaku, screenshots, or screen/audio recording. Prefer the CLI over direct browser automation for Douyin control. Do not use it for video-watching strategy, recommendation guidance, persona behavior, or video creation ideas.
openclaw skills install douyin-web-controldouyin-web 是抖音网页版的底层动作库。这个 skill 的职责是指导 Agent 正确调用 CLI:执行动作、读取 JSON、查看截图、记录限制。它不负责“该看什么视频”“为什么点赞”“怎么做内容创作”等策略问题。
CLI 项目地址:
https://github.com/billwang233/douyin-web-cli
如果系统里还没有安装 CLI,先安装:
python3 -m pip install "git+https://github.com/billwang233/douyin-web-cli.git"
python3 -m playwright install chromium
douyin-web --help
使用本 skill 的场景:
douyin-web CLI。不要用本 skill 的场景:
优先使用 skill 自带包装脚本:
skills/douyin-web-control/scripts/douyin-web --json COMMAND
包装脚本会按顺序寻找 CLI:
$DOUYIN_WEB_CLI$DOUYIN_CLI_ROOT/bin/douyin-webbin/douyin-webPATH 的 douyin-webPATH 的 cli-anything-douyin-web如果需要指定浏览器会话目录,用:
--home ${DOUYIN_WEB_HOME}
如果没有指定,CLI 会使用自己的默认 home。测试时可以用隔离的临时 home:
--home ${DOUYIN_WEB_HOME:-/tmp/douyin-web-home}
并行多个项目时,优先使用全局 --profile,并且后续每条命令都带同一个 profile:
douyin-web --profile project-a --json launch
douyin-web --profile project-a --json open recommend
douyin-web --profile project-a --json current
douyin-web --profile project-b --json launch
douyin-web --profile project-b --json open jingxuan
douyin-web --profile project-b --json current
--profile NAME 会把会话、截图和浏览器数据隔离到 ~/.douyin-web-cli/profiles/NAME/。不要在同一条命令里混用 --profile 和 --home。
--profile;如果后续命令漏掉 profile,会回到默认会话。data.screenshot.path 做视觉确认。douyin-web --json status 或 douyin-web --json wait-login --timeout 300 确认状态,然后继续后续动作。like、follow-author、favorite、share、comment --submit、danmaku-send --submit,执行前确认用户允许。danmaku off、loop、点赞/收藏高亮状态,只报告 CLI 结果和截图,不要声称绝对确认。douyin-web 命令执行测试。登录、验证码和风控处理:
douyin-web --json status
douyin-web --json wait-login --timeout 300
如果 status 显示未登录,或者截图里出现验证码/登录/验证页面,停止当前自动化流程,向用户说明需要人工登录或验证。不要继续点击、不要尝试破解验证码。用户确认处理完成后,再重新运行 status 或 wait-login。
检查会话和登录:
douyin-web --json state
douyin-web --json status
douyin-web --json wait-login --timeout 300
打开页面:
douyin-web --json launch
douyin-web --json open recommend
douyin-web --json open jingxuan
douyin-web --json open ai-search
douyin-web --json open follow
douyin-web --json open friends
douyin-web --json open mine
douyin-web --json open live
douyin-web --json open vs
douyin-web --json open series
查看当前状态:
douyin-web --json current
douyin-web --json info
douyin-web --json screenshot /tmp/douyin-current.png
播放器控制:
douyin-web --json play state
douyin-web --json play pause
douyin-web --json play resume
douyin-web --json play toggle
douyin-web --json next
douyin-web --json prev
douyin-web --json seek --seconds 30
douyin-web --json seek --percent 50
douyin-web --json rate 1.25
douyin-web --json volume 0.8
douyin-web --json sound on
douyin-web --json sound off
修改倍速或音量后,测试结束时尽量恢复:
douyin-web --json rate 1
douyin-web --json volume 1
显示和沉浸控制:
douyin-web --json clean
douyin-web --json fullscreen
douyin-web --json danmaku off
douyin-web --json loop
douyin-web --json prepare
douyin-web --json dismiss
douyin-web --json press Escape
搜索和互动:
douyin-web --json search "关键词"
douyin-web --json search "关键词" --no-submit
douyin-web --json comments open
douyin-web --json comments close
douyin-web --json comment "评论草稿" --no-submit
douyin-web --json danmaku-send "弹幕草稿" --no-submit
douyin-web --json like
douyin-web --json follow-author
douyin-web --json favorite
douyin-web --json share
录制:
douyin-web --json devices
douyin-web --json record /tmp/douyin-record.mp4 --duration 15 --video-index VIDEO_INDEX --audio-index AUDIO_INDEX --verify
录制注意事项:
BlackHole 2ch。devices,因为 AVFoundation 设备编号可能变化。自动测试:
cd ${DOUYIN_CLI_ROOT}/agent-harness
python3 -m pytest -q -rs
真实 CLI 测试:
ok、message 和关键 data 字段。data.screenshot.path。需要完整功能范围、适合/不适合 CLI 化的边界、下一批待补命令时,读取:
references/feature-matrix.md