This duck helps short drama creators and MCN operators scan Bilibili for hit short drama videos by keyword—fish out hit videos in categories like short drama commentary, rants, remixes, and roundups, lay them out in the terminal as a clickable hit table, then cluster them into several directions by content format and assemble them into a short drama daily report that can be used directly for commentary scripts and remix topics.
Data goes through doubaoya.com as one line, and authentication uses your own token (environment variable
DOUBAOYA_API_KEY, in the formdyh_…)。
Use Cases
| Scenario | How to use | What you get |
|---|---|---|
| Daily hit roundup | Use 短剧 to scan today's hit short drama videos on Bilibili |
See at a glance what is trending in the Bilibili short drama section today |
| Commentary topic daily report | Scan by format and cluster into several content directions | A short drama topic daily report you can use directly to write commentary scripts |
| Niche format tracking | Use 短剧解说、短剧吐槽、短剧二创 and other narrow terms |
Lock onto hits in a certain short drama video format |
| Title and cover breakdown | Look at the title and cover angles of high-like videos | Extract the title formulas of Bilibili hit short drama videos |
| Benchmark UP accumulation | Page through several more screens to see who keeps producing hits | Build a first-hand library of Bilibili short drama benchmark UP creators |
Workflow (4 steps)
1. Set the keyword
Extract one short drama direction keyword(required) from the user's description, such as 短剧、短剧解说、短剧吐槽、短剧二创、短剧盘点. Broader terms get more hits, narrower terms are more focused; scan only one keyword at a time.
2. Call the script
python3 "$SKILL_PATH/scripts/fetch_playlet_feed.py" "短剧"
Pagination / adjust items per page (optional):
python3 "$SKILL_PATH/scripts/fetch_playlet_feed.py" "短剧解说" --page 2 --size 30
The script prints the data from the success envelope to stdout as JSON.Run the script only once per query, read the full stdout directly, do not use head/tail to preview, and do not call repeatedly with the same parameters.
3. Render the hit table
Take fields from data.items(video array) and lay them out as a Markdown table. The core fields this API reliably returns are title(title) and likeCount(likes); read defensively—fields may be missing, leave them blank if so, do not error out, and do not invent links or UP creators the API did not return. If a given return happens to include a link, render the title as a clickable link; otherwise plain text is fine.
| Title | Likes |
|---|---|
| Sample hit short drama video | 56,000 |
4. Cluster into a daily report + one insight
Clusterthese videos by content format(such as short drama commentary / high-energy rants / edited remixes / roundup compilations), pick representative hits for each direction, and form a short daily report. At the end, add one line in this duck's voice:topic insight:In today's Bilibili short drama section, which format is best for growing views, and which angle still has open slots. Don't pile on boilerplate, don't ask the user what their purpose is.
Get a key (token)
- Open doubaoya.com
- Log in
- Go to Token Center
- Generate token(in the form
dyh_…)
Configure it into an environment variable (the script only recognizes this):
export DOUBAOYA_API_KEY="dyh_你的口令"
Iron rule: never print the token, never write it into a file, never echo it back to the user. The script itself also never outputs the token. All requests are sent only to doubaoya.com。
API and envelope
POST https://doubaoya.com/api/apis/bilibili/bilibili-playlet-feed/call- Auth header:
Authorization: Bearer $DOUBAOYA_API_KEY - Request body:
{ "keyword": "短剧", "pageNum": 1, "pageSize": 20 }keyword: string, requiredpageNum: integer, optional (default 1, controlled by--pagecontrols)pageSize: integer, optional (default 20, controlled by--sizecontrols)
- Response envelope:
{ "success": true, "requestId": "...", "data": { "items": [ { "title": "...", "likeCount": 56000 } ] }, "error": null } - First check
success: iftrue, only then readdata; otherwise readerror.code/error.message。
Error handling
When the script fails, it prints to stderr [error] CODE: message and exits with exit code 1. Common cases:
| HTTP | code | Meaning | Handling |
|---|---|---|---|
| 401 | MISSING_API_KEY / UNAUTHORIZED |
No token provided or token invalid | Check DOUBAOYA_API_KEY, go to Token Center to regenerate |
| 400 | VALIDATION_ERROR |
Invalid parameter (e.g. keyword is empty) | Fix the keyword and retry |
| 402 | INSUFFICIENT_CREDITS |
Insufficient quota | Go to doubaoya.com to top up/renew quota |
| 502 | PROVIDER_FAILED |
Temporary upstream failure (automatically refunded) | safe to retry |
502 PROVIDER_FAILEDwill automatically refund; retrying is safe and will not double-charge.
Directory structure
playlet-bili-feed/
├── SKILL.md # 本文件
└── scripts/
└── fetch_playlet_feed.py # 零依赖脚本(urllib),调用 doubaoya.com