{"record":{"id":"dd7d3c1f8314960a","repo":"xpzouying/xiaohongshu-mcp","slug":"w-dd7d3c","errorCode":null,"errorMessage":"无法找到评论: %w","messagePattern":"无法找到评论: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"xiaohongshu/comment_feed.go","lineNumber":136,"sourceCode":"\turl := makeFeedDetailURL(feedID, xsecToken)\n\tlogrus.Infof(\"打开 feed 详情页进行回复: %s\", url)\n\n\t// 导航到详情页\n\tpage.MustNavigate(url)\n\tpage.MustWaitDOMStable()\n\thumanize.Delay(ctx, humanize.AfterNavigate)\n\n\t// 检测页面是否可访问\n\tif err := checkPageAccessible(page); err != nil {\n\t\treturn err\n\t}\n\n\ttime.Sleep(2 * time.Second)\n\n\t// 使用 Go 实现的查找逻辑\n\tcommentEl, err := findCommentElement(ctx, page, commentID, userID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"无法找到评论: %w\", err)\n\t}\n\n\t// 滚动到评论位置\n\tlogrus.Info(\"滚动到评论位置...\")\n\tcommentEl.MustScrollIntoView()\n\thumanize.Delay(ctx, humanize.BetweenScroll)\n\n\tlogrus.Info(\"准备点击回复按钮\")\n\n\t// 查找并点击回复按钮\n\treplyBtn, err := commentEl.Element(\".right .interactions .reply\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"无法找到回复按钮: %w\", err)\n\t}\n\n\tif err := humanize.Click(replyBtn); err != nil {\n\t\treturn fmt.Errorf(\"点击回复按钮失败: %w\", err)\n\t}","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/comment_feed.go#L118-L154","documentation":"ReplyToComment 在 feed 详情页通过 findCommentElement（滚动+展开+懒加载）仍未定位到目标评论：commentID/userID 无效、评论已被删除，或评论数过多超出搜索时限。","triggerScenarios":"Thrown at xiaohongshu/comment_feed.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["核对 commentID 与 userID 是否来自最新的评论列表接口","确认该评论未被作者或平台删除","重试一次以排除懒加载超时"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"332d196854a9eac0d2b8c2c0e3d0cc43139d724c","analyzedAt":"2026-09-05T22:22:55.988Z","contentChangedAt":"2026-09-05T22:22:55.988Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}