mit einem Klick
toutiao-publisher
今日头条自动发帖工具,通过 node PC 浏览器全自动发布内容
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
今日头条自动发帖工具,通过 node PC 浏览器全自动发布内容
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
今日头条自动发布工具 - 微头条/文章/视频 + NAS 统一调度(生产就绪)
/pipeline-diagnose、pipeline 挂了、看 pipeline 状态 — Content Pipeline 总体健康诊断,一键输出所有关键状态并引导到具体 stage skill
/pipeline-persondata、修待补充、人物数据占位符 — Content Pipeline Stage 4 (person-data 构造) 运维 skill,修 "待补充/暂无数据" 导致的图片占位符问题
/pipeline-regen、重生图、V6 出图失败 — Content Pipeline Stage 4 (V6 图片生成) 运维 skill
/pipeline-run、用 X 做一套内容、给我生成 X 的内容 — Content Pipeline 手动即时触发(主理人在 Claude Code 对话里临时跑一条,走和 Dashboard 自动路径完全一样的 6 阶段 pipeline,但即时给进度反馈)
金句卡片生成工作流的质检和选择
| name | toutiao-publisher |
| description | 今日头条自动发帖工具,通过 node PC 浏览器全自动发布内容 |
| trigger | 当需要发布内容到今日头条时,用户说"发到今日头条"、"发布到头条" |
| version | 2.0.0 |
| created | "2026-02-01T00:00:00.000Z" |
| updated | "2026-02-01T00:00:00.000Z" |
| changelog | [{"2.0.0":"支持全自动发布(自动点击发布按钮)"},{"1.0.0":"初始版本,支持标题+正文+配图自动填充"}] |
一键发布内容到今日头条小号,全自动完成:填充标题、正文、上传配图、点击发布。
python3 scripts/publish-to-toutiao.py "标题" "正文" "配图.png"
就这么简单!脚本会自动:
无需手动操作,全程自动化!
python3 scripts/publish-to-toutiao.py "标题" "正文内容" "配图.png"
示例:
python3 scripts/publish-to-toutiao.py \
"别把存档当成学会" \
"你的收藏夹里躺着几十篇干货,除了点击收藏的那一秒,你再也没打开过它们..." \
"output/deep-post-cards/01_别把存档当成学会.png"
输出:
连接到今日头条...
打开发布页面...
填写标题: 别把存档当成学会
填写正文...
上传配图: output/deep-post-cards/01_别把存档当成学会.png
点击发布按钮...
✓ 发布成功!
标题: 别把存档当成学会
正文长度: 159 字
配图: output/deep-post-cards/01_别把存档当成学会.png
# 发布 3 篇,每篇间隔 5 秒
python3 scripts/publish-to-toutiao.py "标题1" "正文1" "图1.png" && sleep 5 && \
python3 scripts/publish-to-toutiao.py "标题2" "正文2" "图2.png" && sleep 5 && \
python3 scripts/publish-to-toutiao.py "标题3" "正文3" "图3.png"
在使用前,请确保:
✅ node PC 在线
tailscale status | grep node
# 应显示: 100.97.242.124 node zenithjoy21xx@ windows -
✅ 浏览器端口开启
curl -s http://100.97.242.124:19226/json | head -5
# 应返回 JSON 数据
✅ 今日头条已登录
curl -s http://100.97.242.124:19226/json | grep "mp.toutiao.com"
# 应找到今日头条页面
scripts/publish-to-toutiao.py| 平台 | Host | 端口 | 说明 |
|---|---|---|---|
| 今日头条小号 | 100.97.242.124 | 19226 | node PC via Tailscale |
1. 获取浏览器标签页
↓
2. 连接 WebSocket (CDP)
↓
3. 导航到发布页面
↓
4. 填充标题(input 元素)
↓
5. 填充正文(contenteditable 编辑器)
↓
6. 上传配图(Base64 转换)
↓
7. 输出确认信息
↓
8. 等待用户手动点击发布
// 标题输入框
input[placeholder*="标题"]
input[placeholder*="请填写"]
.byte-input__inner
// 正文编辑器
.ql-editor
[contenteditable="true"]
.public-DraftEditor-content
// 上传按钮
[class*="upload"]
input[type="file"]
# 准备内容
TITLE="别把存档当成学会"
CONTENT="你的收藏夹里躺着几十篇"干货",除了点击"收藏"的那一秒,你再也没打开过它们。..."
IMAGE="output/deep-post-cards/01_别把存档当成学会.png"
# 发布
python3 scripts/publish-to-toutiao.py "$TITLE" "$CONTENT" "$IMAGE"
# 从文件读取内容
python3 scripts/batch-publish-toutiao.py \
--posts /tmp/deep-posts-batch-35.txt \
--images output/deep-post-cards/ \
--count 35
连接到今日头条...
打开发布页面...
填写标题: 别把存档当成学会
填写正文...
上传配图: output/deep-post-cards/01_别把存档当成学会.png
✓ 内容已填充
标题: 别把存档当成学会
正文长度: 159 字
配图: output/deep-post-cards/01_别把存档当成学会.png
⚠️ 测试模式:内容已填充,请手动检查并点击发布
# 检查 Tailscale 连接
tailscale status
# 测试端口
curl -s http://100.97.242.124:19226/json | head -5
# 检查今日头条是否登录
curl -s http://100.97.242.124:19226/json | grep "mp.toutiao.com"
假设你已经有:
/tmp/deep-posts-batch-35.txtoutput/deep-post-cards/步骤 1:准备发布脚本
创建 batch-publish.sh:
#!/bin/bash
# 批量发布脚本
# 读取文案(假设格式:Deep Post N: 标题\n正文\n)
# 匹配配图(output/deep-post-cards/0N_*.png)
for i in {1..35}; do
echo "发布第 $i 篇..."
# 从文件提取标题和正文(需要自己实现解析逻辑)
TITLE=$(grep -A 1 "^Deep Post $i:" /tmp/deep-posts-batch-35.txt | tail -1)
CONTENT=$(grep -A 10 "^Deep Post $i:" /tmp/deep-posts-batch-35.txt | tail -8)
IMAGE=$(ls output/deep-post-cards/$(printf "%02d" $i)_*.png | head -1)
# 发布
python3 scripts/publish-to-toutiao.py "$TITLE" "$CONTENT" "$IMAGE"
# 间隔 5 秒避免频繁操作
sleep 5
done
echo "全部发布完成!"
步骤 2:运行
chmod +x batch-publish.sh
./batch-publish.sh
预计时间:35 篇 × (5秒发布 + 5秒间隔) = 约 6 分钟
创建 scripts/batch-publish-toutiao.py 用于批量处理:
# 读取 Deep Posts 列表
# 逐个发布到今日头条
# 记录发布状态
# 错误重试
| 指标 | 数值 |
|---|---|
| 单篇发布时间 | ~5 秒 |
| 连接建立时间 | ~1 秒 |
| 页面加载时间 | ~3 秒 |
| 内容填充时间 | ~1 秒 |
✅ 全自动发布功能上线
技术细节:
.menu-tab-stick-header-button已发布内容: