📝 Introduction
A Weibo user post query tool. Enter a Weibo user's homepage link or uid to query that user's latest posts, with paginated browsing supported.
✨ Features
| Feature Module | Capability Description | Core Value |
|---|---|---|
| User Query | Enter a Weibo homepage link or uid to query posts | View any user's latest updates with one click |
| Paginated Browsing | Supports browsing results across multiple pages | Explore a user's historical posts page by page |
🔑 Authentication
Get API Key
Please go to Redfox Hub to get the API KEY
Configure API Key
Option 1: Using Qoder as an example, add REDFOX_API_KEY to ~/.openclaw/openclaw.json :
{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }
Option 2: Terminal configuration
export REDFOX_API_KEY="ak_xxxx..."
🔄 Workflow
Step 1: Understand the user's intent and extract the uid
1. Extract the user uid
- If the user provides a Weibo homepage link (such as
https://weibo.com/1784473157), extract the uid from it - If the user directly provides a numeric uid, use it directly
- If the user's intent is vague (such as "help me look up a Weibo user"), proactively ask: "Please provide the Weibo user's homepage link or uid"
- Do not guess on your own and call the script when the user has not provided a uid
2. Identify the page number parameter
- If the user mentions "next page" or "page 2" → the corresponding page number
- If the user mentions "previous page" → current page - 1
- If no page number is mentioned → default to page 1
Step 2: Call the query script
python3 ~/.agents/skills/weibo-post-search/scripts/user_work_list.py "<uid或主页链接>" [--page 页码]
Parameter description:
| Parameter | Description |
|---|---|
| input | User uid or Weibo homepage link (such as https://weibo.com/1784473157) |
--page |
Page number, starting from 1 (default 1) |
The script outputs in JSON format:
| Field | Description |
|---|---|
uid |
User uid |
user_name |
User nickname (taken from the nickname field in the posts; falls back to uid when there is no nickname) |
articles |
User post list |
page |
Current page number |
has_next |
Whether there is a next page (true/false) |
Fields for each post:
| Field | Description |
|---|---|
content |
Post content |
forward_num |
Repost count |
comment_num |
Comment count |
like_num |
Like count |
publish_time |
Publish time (including hours, minutes, and seconds, such as 2025-07-10 14:30:25) |
work_url |
Post link (https://weibo.com/{uid}/{mblogId}) |
Step 3: Determine the result and display it
Case A: articles count > 0 (matching results found)
A1. Inform the user of the query scope
📊 {user_name} Found Nposts (page {page}), the detailed data is as follows:
A2. Render a Markdown table (display all)
| # | 博文内容 | 转发数 | 评论数 | 点赞数 | 发布时间 |
|---|----------|--------|--------|--------|----------|
| 1 | [博文内容](链接) | 305 | 120 | 1.2w | 2025-07-10 14:30:25 |
Number formatting rules:
< 10000: raw number (such as320)≥ 10000:x.xwformat (such as1.2w)
Content rules: [博文内容](work_url); if exceeding 30 characters, truncate and add ...; when the content is empty, display -
A3. Pagination prompt (⚠️ immediately after A2, cannot be omitted, must be output every time)
- If
has_nextis true:
📄 Currently page {page} . Reply "next page" to continue viewing.
- If
has_nextis false (the current page has fewer than 9 items or is empty, and is already the last page):
📄 Currently page {page} , no more data.
⚠️ A1~A3 are all indispensable and must be completed consecutively in the same round of output.
Case B: number of articles = 0 (no matching results)
B1. Apology prompt
😔 {user_name} has no blog post data yet, or this user has enabled privacy protection.