Commit Graph
296 Commits
Author SHA1 Message Date
AlleriaandGitHub 008e4ff66a Update GitHub Sponsors username in FUNDING.yml 2026-07-31 12:55:06 +08:00
AlleriaandGitHub dde0eacb91 Merge pull request #250 from mechanic-Q/feat/douyin-explicit-declaration
fix(douyin): make self-declaration explicit and fail-closed (follow-up to #213)
2026-07-23 08:59:35 +08:00
AlleriaandGitHub 42bd4490ee Merge pull request #253 from snow-moonlight1/fix/tencent-qrcode-extraction
fix(tencent): 适配视频号新版 qrconnect 登录二维码 + cookie_auth 误报修复 + 中文路径二维码解码
2026-07-23 08:58:36 +08:00
snow-moonlight1 662633bb3d fix(tencent): cookie_auth 误报有效 + 上传页登录跳转前置检测
视频号 cookie 失效时, post/create 页面先正常加载, 数秒后才被前端 JS
跳转到 login.html。原 cookie_auth 在跳转前检查, 误报 'cookie 有效',
放行后在上传页报出无关错误(如 '未找到视频号文件上传框')。

- cookie_auth: 等待 8 秒确认是否被踢到 login.html, 外加 qrconnect
  登录 iframe 双保险, 消除误报
- open_upload_page: 同样的跳转检测前置, cookie 失效时报明确错误
  '请重新扫码登录后再发布'
2026-07-23 00:32:57 +08:00
snow-moonlight1 bb1f12977a fix(utils): decode QR image via np.fromfile for non-ASCII paths
cv2.imread cannot open files under non-ASCII (e.g. Chinese) paths on
Windows, so decode_qrcode_from_path() always returned None when the
project lived under a directory like D:\视频全平台同步\, and the
terminal QR re-print silently failed. Use np.fromfile + cv2.imdecode
instead, which handles arbitrary paths.
2026-07-21 14:03:11 +08:00
snow-moonlight1 f4693db9d7 fix(tencent): adapt QR code extraction to new qrconnect login iframe
The WeChat Channels login page now embeds the QR code in an
open.weixin.qq.com/connect/qrconnect iframe whose img.qrcode src is a
relative path (e.g. /connect/qrcode/xxxx) instead of an inline
data:image/ URL. The previous logic looked for a login-for-iframe
frame and only accepted data:image/ sources, so login always failed
with '未获取到视频号登录二维码地址'.

Changes:
- Detect the qrconnect iframe and resolve the relative img src,
  download the QR image via the browser context and convert it to a
  data URL so downstream save/decode logic stays unchanged
- Keep the legacy login-for-iframe and selector fallbacks
- Tolerate QR extraction failure: the login flow now continues and
  lets the user scan directly in the headed browser instead of
  aborting the whole login
2026-07-21 13:42:10 +08:00
lmr f83225c769 fix: move declaration to after runtime flags for positional compat
DouyinVideoUploadRequest dataclass 声明字段位置
被独立审查者(deleg_61d33c80)标记为P1兼容问题:
旧位置调用 ('scheduled', False, False) 会被错位解析。

把 declaration 移到最后,保留旧位置契约。

Previous-Review: deleg_61d33c80
Ref: dreammis/social-auto-upload#213(安全后续修正)
2026-07-18 14:19:42 +08:00
lmr e89d3a875a fix(douyin): require explicit self-declaration 2026-07-18 02:07:55 +08:00
AlleriaandGitHub d32280c98b Merge pull request #243 from sunshine6666666666/feat/bilibili-cover-cli
feat(bilibili): support custom video covers
2026-07-15 13:23:46 +08:00
AlleriaandGitHub 95083e04ac Merge pull request #244 from kelriclink/docs/fix-readme-toc
docs: fix README跳转错误
2026-07-15 13:23:17 +08:00
AlleriaandGitHub 723f703bf7 Merge pull request #245 from anzhen9/main
处理抖音发布视频短信验证码弹窗
2026-07-15 13:20:01 +08:00
anzhen9 395c6434bb feat(douyin): 支持终端交互输入短信验证码 2026-07-11 17:18:13 +08:00
anzhen9 be77aaef8b feat(douyin): 处理短信验证码弹窗 2026-07-11 16:52:42 +08:00
anzhen9 fa59d50030 Revert "feat(douyin): 添加短信验证码弹窗处理并移除多余浏览器参数"
This reverts commit 77b372a56e.
2026-07-11 16:47:04 +08:00
anzhen9 77b372a56e feat(douyin): 添加短信验证码弹窗处理并移除多余浏览器参数 2026-07-11 16:43:37 +08:00
kelriclink 4435d8d174 docs: fix README table of contents links 2026-07-11 15:50:57 +08:00
sunshine6666666666 945bf8e1c0 feat(bilibili): support custom video covers 2026-07-11 10:47:39 +08:00
AlleriaandGitHub 0d3f93e8ac Merge pull request #229 from DerekEXS/fix/douyin-cli-login-overhaul
fix(douyin): overhaul CLI auto-login to handle new creator center UI
2026-06-27 01:16:25 +08:00
AlleriaandGitHub 90b751f791 Merge branch 'main' into fix/douyin-cli-login-overhaul 2026-06-27 01:15:42 +08:00
AlleriaandGitHub d49bdd5daf Merge pull request #234 from Chang-Tao/fix/douyin-cookie-auth
fix(douyin): cookie_auth 容错瞬时跳转,避免间歇性误判失效
2026-06-27 01:11:12 +08:00
OpenClaw Contributor ae72b87141 fix(douyin): overhaul CLI auto-login + supporting fixes (rebased on main)
4 commits squashed into 1 due to force-push via API. See PR #229 body for full description.

Key changes:
- cookie_auth: polling loop (10s) instead of single count() snapshot (race fix)
- cookie_auth: env var DOUYIN_COOKIE_AUTH_HEADLESS for linux server headless override
- _extract_douyin_qrcode_src: 4-tier selector fallback (animate_qrcode_container)
- _wait_for_douyin_login: 2FA detection with warning
- export_douyin_cookie: USERNAME from os.environ
- ks/xiaohongshu uploader: chromium default + cdp_url support for ks
2026-06-25 18:44:55 +08:00
changyandaoc 51209a1331 fix(douyin): cookie_auth 间歇性误判失效——重试3次+宽松判定
有头校验仍会因页面慢/瞬时跳转让 wait_for_url(精确URL,5s) 超时误判,
导致 check 通过但 upload 前置校验失败。改为重试3次 + 等2.5s稳定 +
宽松判定(URL含 content/upload 且无登录文案)。
2026-06-22 18:44:00 +08:00
AlleriaandGitHub 70a58b739f Merge pull request #233 from tankztz/tankztz/xhs-configurable-creator-domain
fix: allow configuring Xiaohongshu creator domain
2026-06-21 21:20:37 +08:00
AlleriaandGitHub b0d873c850 Merge pull request #231 from nirolee/fix/youtube-shorts-autocomplete
fix(youtube): prevent #Shorts hashtag autocomplete from blocking upload
2026-06-21 21:18:49 +08:00
tankztz ea2bcb0d8a fix: allow configuring Xiaohongshu creator domain 2026-06-20 09:45:31 +08:00
nirolee 5b26106fb1 fix(youtube): prevent #Shorts hashtag autocomplete from blocking upload
Title and description were typed character-by-character, so a '#'
(e.g. '#Shorts') triggered YouTube's topic-autocomplete dropdown that
follows the caret and covers the Next/Publish buttons, stalling the
upload. Switch to fill() (one-shot insert, no per-keystroke autocomplete)
with a type() fallback, and add _dismiss_autocomplete (blur, then Escape
only when a dropdown is actually visible so the upload dialog is never
closed by mistake).
2026-06-20 03:34:55 +09:00
home-dev-pookz 1cb7d8a797 add new sponsor 2026-06-20 00:54:00 +08:00
AlleriaandGitHub 78c414d862 Merge pull request #228 from Billy775326/main
feat(douyin): 优化图文发布正文和话题输入方式,添加 --bgm 参数支持选择音乐
2026-06-19 13:53:58 +08:00
AlleriaandGitHub c9d6d5b39c Merge branch 'main' into main 2026-06-19 13:51:25 +08:00
AlleriaandGitHub 23b0cb2468 Merge pull request #227 from nirolee/feat/youtube-uploader
feat(youtube): add YouTube uploader via browser automation
2026-06-19 13:44:45 +08:00
AlleriaandGitHub 99b1db490d Merge pull request #225 from Chang-Tao/fix/uploader-dom-202606
Fix/uploader dom 202606
2026-06-19 13:43:18 +08:00
DerekEXS 42d39f2693 chore(xiaohongshu): switch default channel to chromium
Same reason as the ks uploader: bundled patchright cannot reliably resolve the system 'chrome' channel on every platform, so use the bundled 'chromium' channel by default and rely on conf.py:LOCAL_CHROME_PATH for users who want real Chrome.
2026-06-16 20:12:58 +08:00
DerekEXS dff5a3d7ea feat(ks): switch default channel to chromium and add cdp-url support
Two related changes for kuaishou uploader:

- Default browser channel is switched from 'chrome' to 'chromium'. The launcher binary that ships with patchright no longer reliably resolves the system Chrome channel on every platform, so falling back to bundled chromium avoids launch-time channel-resolution errors. The user can still force a real Chrome via conf.py:LOCAL_CHROME_PATH.

- New cdp_url parameter on ks_setup / get_ks_cookie. When set, the login flow uses connect_over_cdp() to drive the user's already-running real Chrome instead of spawning a separate browser. This is the supported way around strict anti-bot detection: real Chrome has a fingerprint that passes verification, while the bundled chromium does not. should_close_context tracks ownership so we don't close a context we didn't create.
2026-06-16 20:12:48 +08:00
DerekEXS cc963694a3 fix(export_douyin_cookie): read USERNAME from os.environ in embedded python
The shell passed USERNAME as an environment variable to the embedded python heredoc (USERNAME=$USERNAME python3 ...), but the python block referenced USERNAME as if it were already a local variable. The result was NameError on every run, so the export script could never produce a cookies/<platform>_<account>.json file.

Fix: read the env var explicitly with os.environ.get('USERNAME', '') at the top of the embedded block, then use the local USERNAME as before.
2026-06-16 20:12:39 +08:00
DerekEXS 3ed6336376 fix(douyin): overhaul CLI auto-login to handle new creator center UI
The Douyin creator center UI (https://creator.douyin.com/creator-micro/) has been refactored and breaks the existing login flow in three independent ways. This commit fixes all of them.

1. QR code selector no longer matches
   The previous selector chain assumed the QR sat in a sibling div with an aria-label of 二维码. After the refactor, the QR is rendered as a base64 PNG inside div#animate_qrcode_container and has no aria-label. The new chain is a 4-tier fallback (id -> class partial -> container partial -> aria-label) preceded by a networkidle wait so the SPA is fully hydrated before we look.

2. cookie_auth() race condition
   page.goto + wait_for_url(5000) + immediate get_by_text count() was racy: the SPA had not finished hydrating, so count() could return 0 even when the page actually shows the login card, leading to false-positive 'cookie valid' results. Replaced with a 10s polling loop that returns invalid if neither the login-card text nor the upload-page text is observed.

3. _wait_for_douyin_login() only waited for sessionid cookie (120s)
   During 2FA the cookie is not yet set; the page is still on the verification screen and the URL has already changed. The new loop detects 2FA input fields, logs a warning so the user knows to type the SMS code, and keeps polling. Timeout raised to 200s to accommodate the slower human-in-the-loop flow.

Verified the selector chain against the live creator.douyin.com page: returns a 2.9 KB base64 PNG that decodes into a valid douyin scan_login URL.
2026-06-16 19:35:53 +08:00
billy d826a19bb2 feat(douyin): 添加 --bgm 参数支持选择音乐 2026-06-16 15:51:10 +08:00
billy 9c3d8de82d feat(douyin):新增图文标题和正文字符数校验 2026-06-15 15:32:54 +08:00
billy 2c2aea32fe feat(douyin):新增--notef参数,支持从txt/md文件读取正文预编辑内容 2026-06-15 15:31:03 +08:00
billy 621b94fc05 docs(douyin):图文正文终端保留预编辑格式提交示例 2026-06-15 15:10:24 +08:00
billy 73d3b11ca8 docs(douyin):添加tags参数示例 2026-06-15 15:04:03 +08:00
billy 9677fa3d70 fix(douyin)优化图文发布正文和话题输入方式 ,tags直接拼接到description末尾一起赋值,避免hashtag解析混乱 2026-06-15 15:01:36 +08:00
nirolee aa5112e985 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.
2026-06-14 15:18:05 +09:00
nirolee 991bcdfdf3 feat(youtube): add YouTube uploader via browser automation
Add a YouTube uploader that follows the existing cookie-based browser
automation pattern (uploader/youtube_uploader + sau youtube CLI:
login/check/upload-video). Supports title/description/tags, thumbnail,
adding to a playlist (for series), and visibility (public/unlisted/private).

Browser automation is used instead of the official Data API on purpose:
videos uploaded by an unaudited API project are force-locked to private
and cannot be made public without Google's compliance audit, which is
impractical for personal/single-channel use. Browser automation has no
such restriction and matches how every other platform here works.
2026-06-14 01:05:35 +09:00
changyandao 914a5f0910 fix(douyin): cookie 校验改有头,避免无头被反爬墙误判失效
cookie_auth 原硬编码 headless=True,但抖音无头会撞反爬墙→content/upload 跳登录→
间歇性误报 cookie 失效(实测登录刚成功 90s 后校验即失败)。改 headless=False +
反检测 args。
2026-06-13 18:23:35 +08:00
changyandao a083ad911f fix(douyin login): 二维码提取失败不致命 + 登录成功判定放宽
- _save_douyin_qrcode 定位不到二维码元素时不再抛错中止(有头浏览器可直接扫码),仅警告并继续轮询等登录跳转
- _is_douyin_login_completed 放宽到 creator-micro 任意页(不止 /home)
- Path(image_path) 对空路径做守卫
2026-06-13 17:34:39 +08:00
changyandao b9ca544892 fix(douyin): goto 改 domcontentloaded 避免抖音 SPA load 事件超时
创作者中心发布页 load 事件常迟迟不触发,默认 goto(wait_until=load) 偶发 30s 超时。
3 处 content/upload 的 goto 改 wait_until=domcontentloaded + timeout=90000;
对应 wait_for_url 保持仅 timeout(不接受 wait_until)
2026-06-13 16:23:23 +08:00
changyandao e192fa0cb1 fix(tencent): 视频号定时时间选择器收尾容错
set_schedule_time 键入小时后改用 Enter 确认 + 收起浮层做容错(直接点
input-editor 可能被 weui-desktop-dialog 时间选择浮层遮挡),避免定时步偶发卡死
2026-06-13 15:33:01 +08:00
changyandao 5e28092f20 fix(douyin): version_2 发布页适配——标题超时/封面输入/话题上限
- 标题/描述等待 10s→120s:version_2(post/video) 要等视频上传完才渲染表单(实测约40s)
- 封面上传修正:封面弹窗有4个隐藏input,前2个是左侧AI参考图,真封面是 nth(1);旧 .first 传错位置导致封面不生效
- set_thumbnail 先清 shepherd 引导浮层,避免拦截选择封面点击
- 完成按钮用 exact 文本,避免误中完成编辑
2026-06-13 15:16:29 +08:00
changyandaoc f5cb31079c fix(uploader): 适配抖音与视频号发布页最新 DOM 结构
抖音 douyin_uploader:
- 填标题/描述:改用 input[placeholder*=填写作品标题] 与 div.zone-container[contenteditable] 定位
- 话题输入后按 Escape 收起下拉,避免浮层拦截
- '选择封面'与'发布'改用 force 点击,并移除拦截点击的新手引导(shepherd)浮层
- 封面弹窗适配:div.dy-creator-content-modal + input.semi-upload-hidden-input;横竖版切换改用'设置竖封面'按钮;完成后等弹窗关闭

视频号 tencent_uploader:
- upload_video_file 遍历所有 frame 查找文件框 + 重试等待

说明:两平台发布均需有头模式(--headed),无头下视频号上传框不渲染。
2026-06-13 12:01:24 +08:00
home-dev-pookz 90e01c0106 1 2026-06-08 15:04:24 +08:00