xhs-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese执行流程
Execution Flow
1. 确认搜索条件
1. Confirm Search Criteria
从用户输入中提取:
- (必填)— 搜索关键词
keyword - (可选)— 筛选条件
filters
Extract from user input:
- (required) — Search keyword
keyword - (optional) — Filter conditions
filters
2. 调用搜索
2. Call the Search
调用 :
search_feeds- (string,必填)
keyword - (object,可选):
filters- :综合 | 最新 | 最多点赞 | 最多评论 | 最多收藏
sort_by - :不限 | 视频 | 图文
note_type - :不限 | 一天内 | 一周内 | 半年内
publish_time - :不限 | 已看过 | 未看过 | 已关注
search_scope - :不限 | 同城 | 附近
location
Call :
search_feeds- (string, required)
keyword - (object, optional):
filters- : Comprehensive | Latest | Most Likes | Most Comments | Most Collected
sort_by - : All | Video | Image-Text
note_type - : All | Within a day | Within a week | Within half a year
publish_time - : All | Viewed | Unviewed | Followed
search_scope - : All | Same City | Nearby
location
3. 展示结果
3. Display Results
将搜索结果整理为列表展示,每条包含:
- 标题、作者
- 点赞数、评论数、收藏数
- 和
feed_id(后续操作需要)xsec_token
提示用户可以:
- 查看某条笔记详情(使用 xhs-explore)
- 对笔记进行互动(使用 xhs-interact)
Organize search results into a list for display, each entry includes:
- Title, Author
- Like count, Comment count, Collection count
- and
feed_id(required for subsequent operations)xsec_token
Tell users they can:
- View details of a specific note (use xhs-explore)
- Interact with notes (use xhs-interact)
失败处理
Failure Handling
| 场景 | 处理 |
|---|---|
| 未登录 | 引导使用 xhs-login 登录 |
| 无搜索结果 | 建议调整关键词或筛选条件 |
| Scenario | Handling |
|---|---|
| Not logged in | Guide users to log in using xhs-login |
| No search results | Suggest adjusting keywords or filter conditions |