youtube-publisherYouTube 视频自动上传工具。支持视频上传、设置标题/描述/标签/缩略图、管理频道和播放列表。基于 YouTube Data API v3 + OAuth 2.0。
Install via ClawdBot CLI:
clawdbot install pdpaer/youtube-publisherYouTube 视频自动上传与管理工具
基于 YouTube Data API v3 + OAuth 2.0,支持从命令行自动上传视频到 YouTube。
本地 Mac (Python)
↓ OAuth 2.0 认证
Google YouTube Data API v3
↓ 断点续传上传
YouTube 频道
⚠️ 这一步必须手动完成,只需做一次。
mv ~/Downloads/client_secret_*.json ~/.openclaw/workspace/skills/youtube-publisher/client_secret.json
注意: 如果项目处于"测试"状态,需要在 OAuth 同意屏幕 → 测试用户 中添加你的 Google 邮箱。
pip3 install google-api-python-client google-auth-oauthlib google-auth-httplib2
python3 {baseDir}/scripts/youtube_upload.py auth
浏览器会自动打开 Google 授权页面,登录并授权后,Token 自动保存到本地。后续使用无需再授权。
# 基本上传(默认 private)
python3 {baseDir}/scripts/youtube_upload.py upload video.mp4 \
--title "视频标题" \
--description "视频描述" \
--tags AI OpenClaw 自动化
# 公开发布 + 设置缩略图
python3 {baseDir}/scripts/youtube_upload.py upload video.mp4 \
--title "OpenClaw 实战教程" \
--description "详细教程..." \
--tags AI OpenClaw 教程 \
--privacy public \
--thumbnail cover.png \
--category 28
# 上传并添加到播放列表
python3 {baseDir}/scripts/youtube_upload.py upload video.mp4 \
--title "系列教程 #1" \
--playlist PLxxxxxx
# 查看频道信息
python3 {baseDir}/scripts/youtube_upload.py channels
# 列出最近上传的视频
python3 {baseDir}/scripts/youtube_upload.py list
python3 {baseDir}/scripts/youtube_upload.py list -n 20
# 列出播放列表
python3 {baseDir}/scripts/youtube_upload.py playlists
直接对 Agent 说:
"帮我把 ~/Videos/demo.mp4 上传到 YouTube,标题是 xxx,标签加上 AI 和教程"
Agent 会自动调用上传脚本完成发布。
| 分类 | ID | 分类 | ID |
|------|-----|------|-----|
| 电影/动画 | 1 | 游戏 | 20 |
| 汽车/交通 | 2 | 博客/Vlog | 22 |
| 音乐 | 10 | 喜剧 | 23 |
| 宠物/动物 | 15 | 娱乐 | 24 |
| 体育 | 17 | 新闻 | 25 |
| 短片 | 18 | 时尚 | 26 |
| 旅游/活动 | 19 | 教育 | 27 |
| | | 科技 | 28 |
private — 仅自己可见(默认,推荐先用此状态检查后再公开)unlisted — 不公开列出,有链接可访问public — 公开发布请按照"第一步"从 Google Cloud Console 下载 OAuth 凭证文件。
OAuth 同意屏幕未配置。在 Google Cloud Console → OAuth 同意屏幕 → 设置。
YouTube API 有每日上传配额限制(通常约 6 个视频/天)。
自定义缩略图需要频道已通过电话号码验证。
脚本会自动刷新 Token。如果持续失败,删除 token.json 重新授权:
rm ~/.openclaw/workspace/skills/youtube-publisher/token.json
python3 {baseDir}/scripts/youtube_upload.py auth
youtube-publisher/
├── SKILL.md # 本文档
├── client_secret.json # Google OAuth 凭证(需自行配置)
├── token.json # 自动生成的访问令牌
└── scripts/
└── youtube_upload.py # 上传脚本
Generated Feb 26, 2026
Independent YouTubers or content creators can automate the upload of their videos, including setting titles, descriptions, tags, and thumbnails, saving time on manual entry. This is ideal for those producing regular content like tutorials, vlogs, or educational series, ensuring consistent metadata and privacy settings across uploads.
Schools or online learning platforms can use this tool to upload lecture recordings or educational videos to YouTube, organizing them into playlists for different courses. It supports setting privacy to unlisted for controlled access, making it suitable for distributing content to enrolled students without public exposure.
Marketing agencies handling multiple client channels can automate video uploads for ad campaigns, product demos, or promotional content, with options to set tags and categories for SEO optimization. This streamlines workflows for agencies managing high-volume video content across different brands and industries.
Startups in tech or software can upload demo videos, feature updates, or webinar recordings to showcase their products, using the tool to ensure videos are categorized under technology (ID 28) for better discoverability. It helps maintain a professional online presence with automated uploads and metadata management.
Non-profit organizations can upload awareness or fundraising videos to YouTube, using the tool to set descriptions and tags that highlight social causes, and manage privacy settings for targeted outreach. This supports efforts to share content efficiently while maintaining control over visibility and engagement.
Offer a basic free version for individual users with limited uploads per month, and a paid tier for businesses with higher quotas, advanced analytics, and team collaboration features. Revenue comes from subscription fees, targeting small to medium-sized enterprises and professional creators.
License the tool as a white-label product for marketing or media agencies to rebrand and use internally for client video management. Revenue is generated through one-time licensing fees or annual contracts, providing agencies with a customizable automation solution without development costs.
Partner with educational platforms, e-learning sites, or content management systems to integrate this upload functionality directly into their workflows. Revenue comes from API usage fees or revenue-sharing agreements, enabling seamless video publishing for users of those platforms.
💬 Integration Tip
Ensure proper OAuth 2.0 setup by following the Google Cloud Console steps precisely, and test with private videos first to avoid public errors.
Fetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
Fetch and summarize YouTube video transcripts. Use when asked to summarize, transcribe, or extract content from YouTube videos. Handles transcript fetching via residential IP proxy to bypass YouTube's cloud IP blocks.
Browse, search, post, and moderate Reddit. Read-only works without auth; posting/moderation requires OAuth setup.
Interact with Twitter/X — read tweets, search, post, like, retweet, and manage your timeline.
LinkedIn automation via browser relay or cookies for messaging, profile viewing, and network actions.
Search YouTube videos, get channel info, fetch video details and transcripts using YouTube Data API v3 via MCP server or yt-dlp fallback.