SuperAPI AI Directory

tiktok-upload

Marketing & growth

View repository

Updated 10-23 01:00

About this skill

TikTok video publishing

TikTok currently has no sau tiktok command. Use the repository's uploader/tk_uploader/main_chrome.py, and do not invent CLI parameters. Before running, confirm the repository dependencies, the Chrome configuration inconf.py , and the video path provided by the user.

The account session is stored in cookies/tk_uploader/account.json. For the first login, refer to examples/get_tk_cookie.py, and have the user complete the login themselves on the TikTok page. Do not read, copy, or commit cookie files.

For a single video, prefer following the repository API flow below, first using publish_date=0 to indicate immediate publishing:

import asyncio
from pathlib import Path
from conf import BASE_DIR
from uploader.tk_uploader.main_chrome import TiktokVideo, tiktok_setup

account_file = Path(BASE_DIR) / "cookies" / "tk_uploader" / "account.json" video_file = Path(BASE_DIR) / "videos" / "demo.mp4" asyncio.run(tiktok_setup(str(account_file), handle=True)) app = TiktokVideo("Title", str(video_file), ["tags"], 0, str(account_file)) asyncio.run(app.main())


`TiktokVideo` 没有独立简介参数。定时发布需传入明确的 `datetime`,不要自行推算时间。仓库中的 `examples/upload_video_to_tiktok.py` 会批量处理目录下的 MP4、自动从文件提取标题/标签,并安排次日 16:00 发布;除非用户明确要求这些行为,不要直接运行该脚本。

每次发布前让用户确认账号、单条视频、标题、标签及立即/定时方式。页面布局或登录状态不符合预期时停止并报告;只有平台页面确认提交后才报告成功,未知结果先核查 TikTok Studio,不能直接重发。