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>
This commit is contained in:
gorf
2026-06-02 16:32:39 +08:00
co-authored by Cursor
parent 99a392af2c
commit 13f7bd7a2a
+2 -1
View File
@@ -515,7 +515,8 @@ class XiaoHongShuVideo(XiaoHongShuBaseUploader):
break
if self.debug:
xiaohongshu_logger.debug(_msg("🧍", f"预览区域内容: {all_text.strip().replace('\\n', ' ')}"))
normalized_text = all_text.strip().replace("\n", " ")
xiaohongshu_logger.debug(_msg("🧍", f"预览区域内容: {normalized_text}"))
xiaohongshu_logger.debug(_msg("🧍", "还没看到上传成功标识,小人继续等一会"))
else:
# 尝试检查标题输入框是否已经出现,如果是,说明已经进入编辑状态