返回顶部
p

personal-toutiao-pub头条自动发布

今日头条微头条自动发布工具。触发词:"发布头条"、"发微头条"、"头条发布

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
378
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

personal-toutiao-pub

今日头条发布工具

自动发布微头条到今日头条,支持复用本地 Chrome 登录态,支持智能等待登录。

功能特性

  • - ✅ 复用登录态:连接本地 Chrome,无需重复登录
  • 智能等待登录:未登录时自动等待,登录成功后继续
  • 智能内容扩展:内容不足100字自动扩展
  • 自动勾选选项:自动勾选个人观点,仅供参考
  • 支持图片上传:可附带图片发布
  • 截图保存:发布成功后自动截图保存到桌面
  • 支持文件输入:可从文件读取长文本内容

触发方式

发布头条:今天天气真好
发微头条 今天学到了很多新知识
头条发布 分享一个有趣的故事...

使用方法

命令行使用

bash

基本使用(发布默认内容)


python3 toutiao_publish.py

发布指定内容

python3 toutiao_publish.py 今天天气真好,心情也不错!

从文件读取内容

python3 toutiao_publish.py -f content.txt

带图片发布

python3 toutiao_publish.py 内容 --image ~/Desktop/pic.jpg

使用无头模式(新浏览器)

python3 toutiao_publish.py 内容 --headless

未登录时不等待,直接退出

python3 toutiao_publish.py 内容 --no-wait

前置要求

必须启动 Chrome 远程调试:

bash

Mac


/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

Windows

C:\Program Files\Google\Chrome\Application\chrome.exe --remote-debugging-port=9222

Linux

google-chrome --remote-debugging-port=9222

发布流程

  1. 1. 连接本地 Chrome 浏览器
  2. 检查登录状态
- 已登录:直接进入发布页面 - 未登录:显示提示,自动等待登录(最长5分钟)
  1. 3. 打开发布页面
  2. 输入内容(自动扩展到100字以上)
  3. 上传图片(如提供)
  4. 勾选发布选项:
- 声明首发:头条首发(如存在) - 作品声明:个人观点,仅供参考
  1. 7. 点击发布按钮
  2. 保存成功截图

参数说明

参数说明示例
content发布内容今天天气很好
-f, --file
从文件读取 | -f post.txt | | -i, --image | 图片路径 | --image pic.jpg | | --headless | 无头模式 | --headless | | --no-wait | 不等待登录 | --no-wait |

智能等待登录

当检测到未登录时,脚本会:

  1. 1. 显示提示信息:

⏳ 等待登录...
请在 Chrome 浏览器中完成登录
登录成功后将自动继续...
(最长等待 300 秒)

  1. 2. 每2秒检查一次登录状态
  1. 3. 检测到登录成功后自动继续发布流程
  1. 4. 超过5分钟未登录则超时退出

使用 --no-wait 参数可禁用等待功能,未登录时直接退出。

输出

  • - 成功截图:~/Desktop/toutiaopublishsuccess.png
  • 错误截图:~/Desktop/toutiao_error.png

故障排除

问题解决方案
无法连接 Chrome确保 Chrome 已启动并开启 9222 端口
未检测到登录
在 Chrome 中访问 mp.toutiao.com 完成登录 | | 等待登录超时 | 检查网络,重新运行脚本 | | 找不到输入框 | 页面结构可能变化,检查错误截图 | | 图片上传失败 | 检查图片路径和格式 | | 发布失败 | 检查网络连接,查看错误截图 |

依赖

bash
pip3 install playwright --break-system-packages
playwright install chromium

文件结构

skills/toutiao-publisher/
├── SKILL.md # 本说明文件
└── toutiao_publish.py # 主脚本



创建日期:2026-03-08
更新日期:2026-03-08(新增智能等待登录)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 personal-toutiao-pub-1776192205 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 personal-toutiao-pub-1776192205 技能

通过命令行安装

skillhub install personal-toutiao-pub-1776192205

下载

⬇ 下载 personal-toutiao-pub v1.0.0(免费)

文件大小: 7.24 KB | 发布时间: 2026-4-15 10:50

v1.0.0 最新 2026-4-15 10:50
Initial release of personal-toutiao-pub:

- Automatically publishes micro-posts to 今日头条 using local Chrome login state.
- Waits intelligently for login if not already authenticated.
- Expands content to at least 100 characters if needed.
- Supports image uploads, file input, and saves screenshots of successful posts.
- Provides command-line interface with multiple publishing options and troubleshooting guidance.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部