This duck helps you by UP creator UID fetch the portfolio (cursor pagination) — see at a glance which videos a certain UP creator has posted, what the content matrix looks like, and how the topic selection rhythm is arranged, making benchmark research easiest.
Data goes through doubaoya.com in one line, authentication uses your own token (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Get the key (token)
- Open doubaoya.com
- Log in
- Go to Token Center
- Generate token(in the form
dyh_…)
export DOUBAOYA_API_KEY="dyh_你的口令"
Iron rule: the token is never printed, never written to a file, and never echoed back to the user. The script itself also never outputs the token. All requests are sent only to doubaoya.com。
Run the script
Zero dependencies, standard library is enough (Python 3). You need a Bilibili UP creator's UID / mid(can be found in the UP creator's homepage URL).
# 第一页
python3 "$SKILL_PATH/scripts/fetch_user_works.py" --uid 100000
# 翻页:把上一页返回的游标传进来
python3 "$SKILL_PATH/scripts/fetch_user_works.py" --uid 100000 --cursor "下一页游标"
| Parameter | Description | Default |
|---|---|---|
--uid |
UP creator UID / mid (Required) | — |
--cursor |
Pagination cursor | Empty (first page) |
The script prints the data from the success envelope to stdout as JSON.Run the script only once each time, and read the full stdout.
Workflow (3 steps)
- Get the UID: Extract the UID from the UP creator's homepage URL (
space.bilibili.com/<uid>). - Call the script to get data: The works are in
data.items, each containstitle(title),url(link),categoryName(category). If you need more, use the cursor in the response to continue paginating. - Lay out the works table + provide insights: Lay it out as a Markdown table, and after the table add a sentence in this duck's tone — which categories this UP creator mainly focuses on, whether there is a pattern in topic selection, and which videos are their hit drivers.
| Title | Category | Link |
|---|---|---|
| … | … | … |
Read fields defensively (leave blank if missing).
API Contract
POST https://doubaoya.com/api/apis/bilibili/bilibili-user-works/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "uid": "100000", "cursor": "" } - Response envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "url": "...", "categoryName": "..." } ] }, "error": null } - First check
success: only if it istruereaddata; otherwise readerror.code/error.message。
Error code
When the script fails, it prints to stderr [error] CODE: message and exits with code 1.
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No token provided or token invalid | Check DOUBAOYA_API_KEY, go to the Token Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameter (e.g., UID is empty) | Fix --uid and retry |
| 402 | INSUFFICIENT_CREDITS |
Insufficient quota | Go to doubaoya.com to top up/renew quota |
| 502 | PROVIDER_FAILED |
Upstream temporary failure (automatically refunded) | Safe to retry |
Directory structure
bilibili-portfolio-search/
├── SKILL.md # 本文件
└── scripts/
└── fetch_user_works.py # 零依赖脚本(urllib),调用 doubaoya.com
FAQ
Q: Where can I find the UID?
A: Open the uploader's homepage; the number in the URL space.bilibili.com/<数字> is the one.
Q: How do I go to the next page?
A: Pass the cursor from the previous response to --cursor and run it again.
Q: Getting 502 PROVIDER_FAILED?
A: The upstream had a temporary hiccup, the system has automatically refunded, just rerun it.