feat(feed_detail): add loadAllComments parameter to GetFeedDetail functionality
- Enhanced GetFeedDetail method to support loading all comments based on the new loadAllComments parameter. - Updated related handlers and request structures to accommodate the new parameter. - Improved logging to reflect the loading of all comments during feed detail retrieval. - Implemented JavaScript logic to scroll and collect comments when loadAllComments is true.
This commit is contained in:
@@ -321,7 +321,7 @@ func (s *XiaohongshuService) SearchFeeds(ctx context.Context, keyword string, fi
|
||||
}
|
||||
|
||||
// GetFeedDetail 获取Feed详情
|
||||
func (s *XiaohongshuService) GetFeedDetail(ctx context.Context, feedID, xsecToken string) (*FeedDetailResponse, error) {
|
||||
func (s *XiaohongshuService) GetFeedDetail(ctx context.Context, feedID, xsecToken string, loadAllComments bool) (*FeedDetailResponse, error) {
|
||||
b := newBrowser()
|
||||
defer b.Close()
|
||||
|
||||
@@ -332,7 +332,7 @@ func (s *XiaohongshuService) GetFeedDetail(ctx context.Context, feedID, xsecToke
|
||||
action := xiaohongshu.NewFeedDetailAction(page)
|
||||
|
||||
// 获取 Feed 详情
|
||||
result, err := action.GetFeedDetail(ctx, feedID, xsecToken)
|
||||
result, err := action.GetFeedDetail(ctx, feedID, xsecToken, loadAllComments)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user