fix(youtube): wait for upload to finish before publishing; add optional proxy

- Wait until the upload progress reaches 100% before clicking publish. The
  browser-based upload only progresses while the page is open, so publishing
  (and closing the browser) mid-upload cut it off and left the video stuck
  partway (e.g. 76%).
- Add optional YT_PROXY (conf.py): where youtube.com is blocked, direct
  connections time out and the chromium does not use the system proxy, so
  allow pointing it at a local proxy explicitly.
This commit is contained in:
nirolee
2026-06-14 15:18:05 +09:00
parent 991bcdfdf3
commit aa5112e985
3 changed files with 50 additions and 1 deletions
+2
View File
@@ -187,6 +187,8 @@ sau youtube upload-video --account <account_name> --file videos/demo.mp4 --title
> 是因为**未通过 Google 合规审核的 API 项目上传的视频会被强制锁为私享、无法改公开**,对个人/单频道不实用;
> 浏览器自动化没有此限制,可直接发布公开视频,也与本项目其它平台的 cookie 方案一致。
> `--playlist` 适合连载/系列追更;`--visibility` 可选 `public`/`unlisted`/`private`。
> 上传会**等进度到 100% 再点发布**(浏览器上传靠窗口开着传,传一半就发布会被掐断卡在中途)。
> youtube.com 被墙的地区:在 `conf.py` 设 `YT_PROXY = "http://127.0.0.1:7890"`(chromium 不吃系统代理,需显式指定)。
补充说明: