Commit Graph
51 Commits
Author SHA1 Message Date
suihf ad49ebae7a fix(douyin): harden cover, collection and self-declaration flows
- Set cover via native click with retries; skip gracefully instead of failing the whole order
- Select the collection via its dedicated Semi select with overlay cleanup
- Rewrite self-declaration dialog handling (entry/dialog/option/confirm) and reuse it in upload
- Type description before tags and fill via set_input_files with robust upload input detection
- Keep SMS verification code prompt as a publish-loop guard
2026-08-13 09:48:40 +08:00
lmr e89d3a875a fix(douyin): require explicit self-declaration 2026-07-18 02:07:55 +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
AlleriaandGitHub 90b751f791 Merge branch 'main' into fix/douyin-cli-login-overhaul 2026-06-27 01:15:42 +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 c9d6d5b39c Merge branch 'main' into main 2026-06-19 13:51:25 +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 9677fa3d70 fix(douyin)优化图文发布正文和话题输入方式 ,tags直接拼接到description末尾一起赋值,避免hashtag解析混乱 2026-06-15 15:01:36 +08: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 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
智行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