Fix XHS publish flow: persistent profile, upload/edit stability, publish confirmation#26
Open
openUoU wants to merge 6 commits into
Open
Fix XHS publish flow: persistent profile, upload/edit stability, publish confirmation#26openUoU wants to merge 6 commits into
openUoU wants to merge 6 commits into
Conversation
added 6 commits
February 2, 2026 23:52
BetaStreetOmnis
approved these changes
Mar 18, 2026
BetaStreetOmnis
left a comment
Owner
There was a problem hiding this comment.
方向认可,建议保持当前 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
fix: salvage safe parts from PR #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景\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;如果愿意我也可以再补充:发布后跳登录的根因接口日志抓取与自动恢复。