Track bundled vendor runtime sources
Some checks failed
CI / main (push) Has been cancelled
CI / release-e2e (push) Has been cancelled

This commit is contained in:
2026-07-07 10:05:50 +08:00
parent fbe179ab53
commit 52636c91ae
2111 changed files with 1850012 additions and 14 deletions

View File

@@ -0,0 +1,44 @@
import subprocess
import sys
from pathlib import Path
from conf import BASE_DIR
from utils.constant import VideoZoneTypes
from utils.files_times import generate_schedule_time_next_day, get_title_and_hashtags
if __name__ == '__main__':
filepath = Path(BASE_DIR) / "videos"
folder_path = Path(filepath)
files = list(folder_path.glob("*.mp4"))
file_num = len(files)
publish_datetimes = generate_schedule_time_next_day(file_num, 1, daily_times=[16])
cli_path = Path(BASE_DIR) / "sau_cli.py"
for index, file in enumerate(files):
title, tags = get_title_and_hashtags(str(file))
print(f"视频文件名:{file}")
print(f"标题:{title}")
print(f"Hashtag{tags}")
desc = title
schedule_text = publish_datetimes[index].strftime("%Y-%m-%d %H:%M")
command = [
sys.executable,
str(cli_path),
"bilibili",
"upload-video",
"--account",
"creator",
"--file",
str(file),
"--title",
title,
"--desc",
desc,
"--tid",
str(VideoZoneTypes.SPORTS_FOOTBALL.value),
"--tags",
",".join(tags),
"--schedule",
schedule_text,
]
subprocess.run(command, check=True)