feat: 添加小红书Feed评论功能 (#50)
实现通过HTTP GIN API和MCP API发表评论到小红书Feed的功能: - 新增POST /api/v1/feeds/comment端点 - 新增post_comment_to_feed MCP工具 - 添加PostCommentRequest和PostCommentResponse类型 - 实现PostCommentToFeed服务方法 - 新增CommentFeedAction用于浏览器自动化操作 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ func (f *FeedDetailAction) GetFeedDetail(ctx context.Context, feedID, xsecToken
|
||||
page := f.page.Context(ctx).Timeout(60 * time.Second)
|
||||
|
||||
// 构建详情页 URL
|
||||
url := fmt.Sprintf("https://www.xiaohongshu.com/explore/%s?xsec_token=%s&xsec_source=pc_feed", feedID, xsecToken)
|
||||
url := makeFeedDetailURL(feedID, xsecToken)
|
||||
|
||||
// 导航到详情页
|
||||
page.MustNavigate(url)
|
||||
@@ -75,3 +75,7 @@ func (f *FeedDetailAction) GetFeedDetail(ctx context.Context, feedID, xsecToken
|
||||
Comments: noteDetail.Comments,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func makeFeedDetailURL(feedID, xsecToken string) string {
|
||||
return fmt.Sprintf("https://www.xiaohongshu.com/explore/%s?xsec_token=%s&xsec_source=pc_feed", feedID, xsecToken)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user