Commit Graph
34 Commits
Author SHA1 Message Date
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
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
智行oloandClaude Opus 4.8 7ae6943627 feat(douyin): 「自主声明」默认勾选「内容为个人观点或见解」
抖音发布页「自主声明」为必选项,此前自动化未填,是发布流程的缺口。新增
DouYinBaseUploader.set_self_declaration:点开占位「请选择自主声明」→ 弹窗
「对作品内容添加声明」中单选「内容为个人观点或见解」(exact 避免误点预览
文案) → 确定;在 DouYinVideo 贴完封面后调用。入口/弹窗均异步渲染,等不到
则 warning 跳过、继续发布,与小红书话题、视频号声明原创的容错策略一致。
当前仅覆盖视频(DouYinVideo),图文 DouYinNote 未涉及。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 20:14:58 -07:00
home-dev-pookz 90d03dc15a 小红书重构
1. 图文上传
2. 视频上传(封面,定时)
3. cli
4. skill
5. 无头模式
2026-03-25 15:19:40 +08:00
home-dev-pookz 90845f50ad 重构douyin上传,增加douyin图文
修复douyin视频封面上传
2026-03-24 23:02:22 +08:00
home-dev-pookz fe6e9f4af9 重构douyin上传,增加douyin图文
修复douyin视频封面上传
2026-03-24 21:33:15 +08:00
home-dev-pookz ab2dbb0de6 1. 抖音我这边遇到必须上传封面的情况,自动设置第一个推荐封面(大概率首帧) 2025-12-09 15:01:04 +08:00
听风 de2389c9b1 feat: 增加Docker容器环境 2025-11-06 14:50:19 +08:00
Leo Song d20fc13631 添加注释 2025-11-03 15:19:41 +08:00
Leo Song 0235e89b9e 重新支持抖音封面设置 2025-11-03 15:17:50 +08:00
Leo Song 2f95a5512c wait for elements 2025-10-24 16:31:43 +08:00
Leo Song 2dbedcc206 如果链接不可用,关掉弹窗 2025-10-18 13:07:27 +08:00
AlleriaandGitHub adb6af2a71 Merge branch 'main' into feature/douyin-productlink 2025-10-17 11:01:12 +08:00
home-dev-pookz c1c8fe12dc 暂时注释掉,地理位置设定,暂时没时间解决 2025-10-17 10:51:13 +08:00
Leo Song 327ed18ba2 bug fixes 2025-10-15 16:50:58 +08:00
Leo Song 250fff19a9 [feature] support product link in douyin 2025-10-15 16:25:12 +08:00
Edan's Win11 77c62a2b0f fix: 将 sau_backend 目录的文件,再挪回根目录,以防止大家迁移出现问题 2025-06-03 17:02:28 +08:00
Edan's Win11 5c91a68d8c fix: 将所有后端文件都迁移到 sau_backend 文件夹内 2025-06-03 15:28:08 +08:00
home-dev-pookz 6c57f6d64a 是dy账号之间有不同页面了吗,验证部分怎么会出现两种情况
还是我错觉了,不管了加上去再说
2025-04-22 16:25:19 +08:00
home-dev-pookz 7b7f67303a 修复抖音判断页面的等待时间3秒 2025-04-22 11:44:45 +08:00
home@pookz.com 6e9298fd7f fix:粗糙修复,兼容两种跳转页面 2025-01-08 11:09:46 +08:00
zeayal 79f8070b6a fix douyin upload 2025-01-04 21:08:59 +08:00
zeayal 210470ba41 fix douyin
修复抖音无法发布问题
2025-01-04 17:30:25 +08:00
home@pookz.com eaac0dff52 fix:粗糙修复,封面上传 2024-11-22 14:10:26 +08:00
home@pookz.com e7150226c6 fix:粗糙修复,封面上传,加入了1个timeout,没那么多时间让其更合理,有愿意贡献的提pr优化 2024-11-11 17:17:28 +08:00
home@pookz.com 021ed2096b 1. change 重新上传 locator 2024-11-02 13:03:33 +08:00
pookz@stme 1e35b061c9 1. douyin 上传封面部分更稳定
2. 位置不知道为何出现奇怪的情况,暂时先不解决
2024-09-03 17:39:59 +08:00
pookz@stme cd1a82fbb9 1. 统一命名thumbnail
2. 更换完成定位
2024-08-23 15:14:37 +08:00
forrestsocool 57eda1b7fd clean code 2024-08-22 16:25:21 +08:00
forrestsocool 7c9f5d2ec4 add douyin cover upload 2024-08-22 16:22:44 +08:00
snailRun-hard 5e7ea3c5ba fix: 抖音web页面改版,兼容一下页面元素无法获取的问题 2024-08-16 17:58:52 +08:00
gaoxu 76d2c33963 fix: 抖音web页面改版,无法获取上传按钮的问题 2024-08-16 14:39:32 +08:00
pookz@stme e09fb06477 fix: 抖音因为设置地理位置可能造成的阻塞 2024-08-14 10:44:17 +08:00
pookz@stme 3158eb9a4c 1. add kuaishou uploader
2. refactor the code
2024-08-08 18:38:13 +08:00