Skip to content

Fix XHS publish flow: persistent profile, upload/edit stability, publish confirmation#26

Open
openUoU wants to merge 6 commits into
BetaStreetOmnis:mainfrom
openUoU:fix/publish-flow
Open

Fix XHS publish flow: persistent profile, upload/edit stability, publish confirmation#26
openUoU wants to merge 6 commits into
BetaStreetOmnis:mainfrom
openUoU:fix/publish-flow

Conversation

@openUoU

@openUoU openUoU commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

背景\n使用 Playwright 自动发布小红书图文时,遇到:上传后不进入编辑页、标题超限、发布后页面跳登录但实际上已发布等问题。\n\n## 主要改动\n- 使用独立持久化 Playwright profile(~/.xhs_system/chrome_profile_pm),避免系统 Default profile + remote debugging 冲突,并稳定登录态/缓存\n- 修复上传流程:真实点击『上传图片』按钮(绕过 upload-input 覆盖),再走 file chooser;等待进入『发布图文』编辑页\n- 标题限制:发布前强制标题 <= 20 字(超出自动截断),避免 24/20 导致发布校验失败\n- 发布点击:只点击页面底部主『发布』按钮(从所有发布按钮里选 y 最大的那个),并用 mouse down/up 模拟真实点击\n- 发布结果判定:不再仅依赖 toast;新增到『笔记管理』按标题文本确认是否已发布(更可靠)\n\n## 复现与验证\n- 复现:在 creator 发布页上传图片→进入编辑→填标题/正文→点击发布\n- 之前:标题超限/发布后跳登录导致误判失败\n- 现在:标题自动截断;发布后通过笔记管理确认发布结果\n\n> 注:发布后跳登录现象仍可能出现,但现在不会误判发布失败。\n\n@BetaStreetOmnis (原作者)麻烦看看这个 PR;如果愿意我也可以再补充:发布后跳登录的根因接口日志抓取与自动恢复。

@BetaStreetOmnis BetaStreetOmnis left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方向认可,建议保持当前 PR 打开;我会把其中低风险、可复用的部分提炼到一个干净分支单独合入,避免把硬编码和旧流程一起带进 main。

BetaStreetOmnis added a commit that referenced this pull request Mar 18, 2026
BetaStreetOmnis pushed a commit that referenced this pull request Mar 18, 2026
BetaStreetOmnis added a commit that referenced this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants