Commit Graph
251 Commits
Author SHA1 Message Date
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
home-dev-pookz 90e01c0106 1 2026-06-08 15:04:24 +08:00
home-dev-pookz b7dbbd2dff 去掉社区其他入口 2026-06-08 15:01:55 +08:00
AlleriaandGitHub acbeb7cc4f Merge pull request #218 from Billy775326/main
feat(douyin): 抖音手动获取cookie
2026-06-05 08:53:47 +08:00
AlleriaandGitHub a74e8839a1 Merge pull request #219 from mrzhangguoguo/fix/xhs-tags-limit-and-original-declaration
fix(xiaohongshu): limit tags to 10 and add original declaration
2026-06-05 08:51:46 +08:00
zzxthy 8d030c7c61 fix(xiaohongshu): limit tags to 10 and add original declaration
- Add tag count validation (max 10) in both CLI and uploader layers
  - CLI: exit with error if tags > 10, prompt user to reduce
  - Uploader: truncate to first 10 with warning as fallback
  - Prevents infinite loop when XHS UI rejects excess tags

- Add check_original_declaration() to auto-check original content
  declaration before publishing (video and note modes)
  - Gracefully skips if the option is not present on the page
2026-06-04 16:33:24 +08:00
billy ff951285a3 feat(douyin): 抖音手动获取cookie 2026-06-03 10:45:21 +08:00
AlleriaandGitHub 5716d486cc Merge pull request #211 from muy97212-spec/fix/tencent-original-statement-optional
fix(tencent): 视频号「声明原创」缺失时跳过而非中止发布
2026-06-03 09:45:51 +08:00
AlleriaandGitHub 47f32ffff7 Merge pull request #212 from sebastiondev/fix/cwe22-sau-backend-upload-e0f9
fix(upload): prevent path traversal in file upload endpoints
2026-06-03 09:44:51 +08:00
AlleriaandGitHub 4f02d22ae2 Merge pull request #213 from muy97212-spec/feat/douyin-self-declaration
feat(douyin): 发布时自动选择「自主声明」;fix(xiaohongshu): 话题候选超时不再中断发布
2026-06-03 09:43:32 +08:00
AlleriaandGitHub f5c2e13df8 Merge pull request #217 from gorf/fix/xhs-upload-debug-log-syntax
fix: avoid f-string backslash syntax error in xiaohongshu uploader
2026-06-03 09:42:52 +08:00
AlleriaandGitHub ae8beca839 Merge pull request #216 from yoqu/codex/dual-cover-aspects
feat(cli): 支持双比例封面参数
2026-06-03 09:42:17 +08:00
gorfandCursor 13f7bd7a2a fix: avoid f-string backslash syntax error in xiaohongshu uploader
Move newline normalization out of the f-string expression so the CLI can import and run under Python 3.11+ without syntax errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 16:32:39 +08:00
yoqu aa526b6ca8 feat(cli): 支持双比例封面参数 2026-06-02 16:30:27 +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
智行oloandClaude Opus 4.8 1b36b8bd9b fix(xiaohongshu): 话题候选等不到时跳过该标签继续发布
话题依赖小红书联想接口实时返回,网络抖动或无匹配时等不到候选框,会让整条
发布失败。改为 try/except:放宽超时(3s/2s→6s/4s),仍等不到就记 warning、
退格清掉已键入的 #tag 残留文本后 continue。标签为可选增强项,不应阻断主流程。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 19:01:47 -07:00
智行oloandClaude Opus 4.8 3ef4cd322a fix(tencent): 视频号「声明原创」缺失时跳过而非中止发布
视频号原创声明是可选项,但 apply_original_statement 在未找到声明入口时
会 raise RuntimeError 中止整个发布。在改版后的发布页(部分账号用 wujie
微前端,DOM 结构不同)经常匹配不到入口,导致本可正常发布的视频全部失败。

改为:未找到声明入口时记录 warning 并继续发布,不再中止。同时给诊断分支的
body 定位加 .first,避免页面存在多个 <body> 时 Playwright strict mode 崩溃。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 02:11:38 -07:00
AlleriaandGitHub 99a392af2c Merge pull request #205 from sunreview/main
修复了快手定时发布时间错误的问题
2026-05-30 16:20:30 +08:00
AlleriaandGitHub 91d8481ffd Merge pull request #209 from tankyhsu/fix/tencent-cli-original-declaration
fix: add Tencent CLI and improve original declaration handling
2026-05-30 16:19:50 +08:00
Sebastion d8c95b0992 fix: sanitize filenames in upload endpoints to prevent path traversal (CWE-22) 2026-05-30 08:05:12 +01:00
tianqi 1cba88de15 fix: add tencent cli and original declaration handling 2026-05-28 17:14:03 +08:00
home-dev-pookz 721476f7b4 chilltion sponsor 2026-05-17 17:15:41 +08:00
tomridder 24807633f7 修复了快手定时发布时间错误的问题 2026-05-12 09:30:58 +08:00
AlleriaandGitHub 78b77f6177 Merge pull request #202 from zzzzzy2k/bugfix/zzyBugFix
fix: 修复小红书上传只有一个标签的问题
2026-05-07 13:21:53 +08:00
zzzzzy2kandGitHub 8c30f4c6a6 fix: 修复小红书上传只有一个标签的问题 2026-05-03 14:03:10 +08:00
home-dev-pookz 34a3b3b47e ok 2026-04-24 17:03:19 +08:00
home-dev-pookz 31e27137da 1 2026-04-24 16:45:48 +08:00
home-dev-pookz 13984e60e6 change context 2026-04-24 16:39:16 +08:00
home-dev-pookz 94fedc5be4 update 2026-04-22 21:16:51 +08:00
home-dev-pookz 2eb6633bd2 腾讯重构一版
但是还没弄完...
2026-04-22 19:58:38 +08:00
home-dev-pookz 6fa68d4974 腾讯重构一版
但是还没弄完...
2026-04-22 19:55:45 +08:00
home-dev-pookz ff0285c7a6 腾讯重构一版 2026-04-22 19:04:20 +08:00
AlleriaandGitHub cccfea0232 Merge pull request #193 from ikiaichat/bugfix/xhs
fix: 修复小红书上传视频卡等待的问题,把原来的精准定点找词改成全局模糊识、多信号状态检测
2026-04-13 18:57:56 +08:00
fengxian.guo fc531e9783 fix: 修复小红书上传视频卡等待的问题,把原来的精准定点找词改成全局模糊识、多信号状态检测 2026-04-08 12:00:04 +08:00
AlleriaandGitHub 67da11bddc Merge pull request #186 from joyholmes/fix/bilibili-reuse-cached-biliup
fix: 优先复用本地缓存的 biliup,避免每次运行都强制检查 GitHub Release
2026-03-26 20:24:00 +08:00
houjingyangandjoyholmes 05adf763ba fix(bilibili): 优先复用本地缓存的 biliup,避免每次运行都强制检查 GitHub Release 2026-03-26 19:19:09 +08:00
home-dev-pookz a9049a5e47 update readme 2026-03-25 17:32:26 +08:00
home-dev-pookz 90d03dc15a 小红书重构
1. 图文上传
2. 视频上传(封面,定时)
3. cli
4. skill
5. 无头模式
2026-03-25 15:19:40 +08:00
home-dev-pookz ce9a9f102e docs: add browser cli unification plan 2026-03-25 14:31:44 +08:00
home-dev-pookz 4c2de2c870 docs: update browser cli parameter naming 2026-03-25 14:28:25 +08:00
home-dev-pookz 64d0236f5f docs: add browser cli unification design 2026-03-25 14:23:03 +08:00
home-dev-pookz 2277a5fdf9 临时留档 2026-03-25 13:55:23 +08:00
home-dev-pookz b1f9b1af61 docs: clarify account name semantics 2026-03-25 04:38:37 +08:00
home-dev-pookz 02afa4dbee docs: clarify legacy uploader examples 2026-03-25 04:33:07 +08:00
home-dev-pookz 0778e29a04 feat: finalize bilibili cli workflow 2026-03-25 04:29:35 +08:00
home-dev-pookz 03953df4ec test: isolate biliup runtime cache assertions 2026-03-25 03:49:48 +08:00
home-dev-pookz 2b6a16e76a docs: add bilibili cli guidance and attribution 2026-03-25 03:48:38 +08:00