{"record":{"id":"d560e79169d99feb","repo":"xpzouying/xiaohongshu-mcp","slug":"s-d560e7","errorCode":null,"errorMessage":"笔记不可访问: %s","messagePattern":"笔记不可访问: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"xiaohongshu/feed_detail.go","lineNumber":928,"sourceCode":"\n\t// 检查关键词\n\tkeywords := []string{\n\t\t\"当前笔记暂时无法浏览\",\n\t\t\"该内容因违规已被删除\",\n\t\t\"该笔记已被删除\",\n\t\t\"内容不存在\",\n\t\t\"笔记不存在\",\n\t\t\"已失效\",\n\t\t\"私密笔记\",\n\t\t\"仅作者可见\",\n\t\t\"因用户设置，你无法查看\",\n\t\t\"因违规无法查看\",\n\t}\n\n\tfor _, kw := range keywords {\n\t\tif strings.Contains(text, kw) {\n\t\t\tlogrus.Warnf(\"笔记不可访问: %s\", kw)\n\t\t\treturn fmt.Errorf(\"笔记不可访问: %s\", kw)\n\t\t}\n\t}\n\n\t// 如果有文本但不匹配关键词，返回未知错误\n\ttrimmedText := strings.TrimSpace(text)\n\tif trimmedText != \"\" {\n\t\tlogrus.Warnf(\"笔记不可访问（未知原因）: %s\", trimmedText)\n\t\treturn fmt.Errorf(\"笔记不可访问: %s\", trimmedText)\n\t}\n\n\treturn nil\n}\n\n// ========== 数据提取 ==========\n\nfunc (f *FeedDetailAction) extractFeedDetail(page *rod.Page, feedID string) (*FeedDetailResponse, error) {\n\tvar result string\n","sourceCodeStart":910,"sourceCodeEnd":946,"githubUrl":"https://github.com/xpzouying/xiaohongshu-mcp/blob/332d196854a9eac0d2b8c2c0e3d0cc43139d724c/xiaohongshu/feed_detail.go#L910-L946","documentation":"checkPageAccessible detects blocked-note pages on xiaohongshu by keyword matching the page text (e.g. '因违规无法查看'). When a known blocking keyword appears, it throws '笔记不可访问: <keyword>' to abort detail/comment operations on an inaccessible note.","triggerScenarios":"Calling GetFeedDetailWithConfig, PostComment or ReplyToComment on a note whose rendered page text contains a block keyword such as '因违规无法查看' (note deleted, private, region-locked, or taken down for violation).","commonSituations":"Note was deleted by the author or removed by moderation after you captured its ID; note requires login/attention to view; scraping a note ID from an old cached list.","solutions":["Check the note URL in a browser; if it is blocked the note cannot be processed — skip it","Refresh the feed ID from a fresh feeds list instead of a cached one","Catch this error and mark the note as inaccessible in your pipeline rather than retrying"],"exampleFix":"// before\ndetail, err := client.GetFeedDetailWithConfig(ctx, feedID, cfg)\nif err != nil { return err }\n// after\ndetail, err := client.GetFeedDetailWithConfig(ctx, feedID, cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"笔记不可访问\") { log.Warn(\"skip blocked note \"+feedID); return nil }\n    return err\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"detail, err := client.GetFeedDetailWithConfig(ctx, id, cfg)\nif err != nil {\n    if strings.Contains(err.Error(), \"笔记不可访问\") {\n        log.Warnf(\"skip inaccessible note %s: %v\", id, err)\n        return nil // skip\n    }\n    return err\n}","preventionTips":["Refresh feed IDs from live listings instead of long-lived caches","Pre-check note URLs before batch processing","Maintain a blocklist of IDs previously flagged inaccessible"],"tags":["xiaohongshu","scraping","blocked-content"],"backgroundTag":"note-not-accessible","analyzedSha":"332d196854a9eac0d2b8c2c0e3d0cc43139d724c","analyzedAt":"2026-09-05T22:22:55.988Z","contentChangedAt":"2026-09-05T22:22:55.988Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}