Overview
Bilibili short drama hit content tracking tool, automatically scans Bilibili short drama creation content daily, filters hit works by like count, intelligently clusters themes, and generates a visualized HTML daily report and creation trend analysis.
Through a data-driven approach, it helps short drama creators, MCN agencies, and content operations personnel accurately grasp Bilibili short drama traffic trends.
You can:
- 📊 Get the daily Bilibili short drama hit rankings
- 🏷️ Automatically identify popular theme directions (time travel/domineering CEO/rebirth/suspense, etc.)
- 📈 In-depth analysis of hit title characteristics and creator performance
- 📄 One-click generation of a dark-theme HTML visualized daily report
Suitable for scenarios such as short drama creators, MCN agencies, and content operations personnel who need to track Bilibili short drama trends.
Important: Data is updated daily at 15:00 with the previous day's data (actual updates may be delayed; refer to the script's real liveness check). Before querying, the script first performs input validation: keywords must match the short drama theme keyword lexicon (
topic_keywordsas specified intheme name + all related words, e.g. "face-slapping" matches related words for the counterattack theme),after a match, directly use that keyword to query data; if it does not match,do not request any interface, directly remind "keyword does not meet query conditions" and recommend related words.No-data confirmation rule: When a query has no matching data or the full dataset is insufficient, it is prohibited to automatically initiate any additional queries (automatic fallback to the full dataset is prohibited, automatic theme expansion is prohibited); first display recommended theme keywords and ask the user, and only after user confirmation may a query be initiated; when the date exceeds the valid query range, remind the user and automatically fall back to the most recent date with data, without requiring user confirmation.
Features
🎯 Core Features
| Feature Module | Capability Description | Core Value |
|---|---|---|
| Hit Discovery | Filter popular content from Bilibili short dramas by like count | Accurately locate high-heat short drama works |
| Theme Clustering | Automatically identify theme directions (time travel/domineering CEO/rebirth/suspense, etc.) | Daily theme classification is dynamically determined by content |
| Smart Query | By default, query all short dramas; if a keyword matches the lexicon (theme name + related words), query directly; when data is insufficient, prompt recommended themes and wait for confirmation | Save interface quota and obtain data efficiently |
| Custom Query | Users can specify any theme/creator/keyword for targeted queries | Flexibly cover any short drama niche direction |
| Creation Insights | Analyze hit title characteristics, theme trends, and creator performance | Deeply uncover creation patterns |
| Visualized Daily Report | Dark-theme HTML, cover image + interaction data + direct work links | Intuitively display daily short drama hot spots |
| One-click Subscription | --subscribe Enable daily automatic output |
Daily report automatically saved in local folder |
✨ Feature Highlights
- ⚡ Probe-based date pre-check: Before calling, use a lightweight request (no keyword, pageSize=1) to truly probe whether the target date has data, replacing pure local clock inference, automatically intercepting invalid queries and avoiding wasted API quota
- 🧭 Pre-input validation: Before querying, first check whether the user's category/keyword matches the short-drama theme lexicon (theme name + all related terms; on hit,directly use that keyword to query data), and whether the date is within the valid query range; when none are satisfied,do not request any API, directly remind "keyword does not meet query conditions" and recommend related categories and keywords; for mixed terms, retain valid keywords for the query
- 🔄 Automatic fallback:
--latestautomatically fall back up to 7 days forward to find the most recent date with data before generating the daily report, completely ending "error on empty result" - ⏸️ No-data confirmation system: When a query has no matching data or insufficient full data,do not automatically expand the theme or automatically degrade to full data, prompt recommended theme keywords and wait for the user to confirm before querying
- 🧠 Structured empty reason: On an empty result, clearly output the reason (no data in data source/no keyword match/API exception) and give next-step suggestions
- 🎨 Bilibili-style daily report: Dark theme + Bilibili blue (#00A1D6), cover images lazy-loaded, BV numbers directly linked
- 📊 Zero-value hiding: When interaction metrics are 0, automatically hide them, making the daily report cleaner
One-click install
Prerequisites
- Python 3 runtime environment
- Registered RedFox Hub account and obtained an API Key
Obtaining an API Key
Go to RedFox Hub official website to register; after logging in, obtain it in the personal center, in the format ak_xxxxxxxx. Newly registered users receive free credits.
Environment variable configuration
The data query API authenticates via the request header X-API-KEY , and the Key is obtained from the environment variable REDFOX_API_KEY .
| Variable name | Required | Description |
|---|---|---|
REDFOX_API_KEY |
Yes | RedFox Hub API access key, format ak_xxxxxxxx |
Configuration method:
- macOS/Linux: Append
export REDFOX_API_KEY=<值>to~/.zshrcor~/.bashrc, thensourceto make it take effect - Windows:
[Environment]::SetEnvironmentVariable("REDFOX_API_KEY", "<值>", "User")(terminal restart required) - Verify after configuration:
echo $REDFOX_API_KEY(macOS/Linux) orecho %REDFOX_API_KEY%(Windows)
When calling the API, record the source synchronously via the
sourcefield (value短剧B站信息源-GitHub); no additional call to the save API is required.
Usage Guide
Detailed execution flow, field mapping, HTML rules, metric display rulesSee core_workflow.md
Basic Usage
1. Date pre-check (automatically executed before each query)
- Pre-validation (v2.2): First check whether the date is within the valid query range—format must be YYYY-MM-DD and cannot be later than today; when out of range, remind "date out of valid query range" and recommend the nearest available date
- Estimated starting point: Latest available date before 15:00 = T-2 (the day before yesterday), after 15:00 = T-1 (yesterday)—only as the initial starting point
- Real probe: The script uses
pageSize=1a lightweight request without keywordto actually probewhether the target date has data, based on the API response (the data source's actual update time may be later than 15:00) - Automatic fallback (v2.1): When the date queried by the user is not updated or exceeds the query time range, the script automatically falls back to obtain the most recent time range data, and clearly informs the user: "The current query time is not updated or exceeds the query time range; the most recent time range data has been automatically obtained for you." No manual confirmation is required
--latestmode also automatically falls back (up to 7 days) to locate the most recent date with data- If there is no data within the 7-day fallback, prompt the user to try again later or contact the data source to confirm the update status
2. Generate hit daily report
User: Check the latest Bilibili short drama daily report
Assistant: Check date availability → Execute script to generate daily report → Output trend analysis
# 生成最新一期日报(用户确认后,自动跳过无数据日期,不扣积分)
python3 "$SKILL_PATH/scripts/playlet_bili_daily.py" --latest
# 生成指定日期日报(历史日期已有数据,无需确认)
python3 "$SKILL_PATH/scripts/playlet_bili_daily.py" --date 2026-06-10
Query strategy: By default, query all short dramas (pageSize=200). When data is insufficient (<100 records), automatically add popular themes (time travel → CEO romance → rebirth → suspense → sweet romance → counterattack). All themes are queried at once through the batch API. Before querying, automatically probe the target date; empty results are automatically retried once.
3. Creative trend analysis
After the daily report is generated,mustautomatically perform creative trend analysis based on the clustering results:
- Read the theme clustering results and select the TOP 5 popular themes
- Analyze each theme's number of hits, average interaction data, and characteristics of top works
- Identify emerging themes gaining traction (few in number but high interaction)
- Output a structured creative trend report (format see the output template below)
Advanced usage
Custom theme query
Users can specify any combination of themes for targeted query and analysis:
# 查询穿越题材热门短剧
python3 "$SKILL_PATH/scripts/playlet_bili_daily.py" --topics "穿越,时空,重生"
# 查询霸总/甜宠题材
python3 "$SKILL_PATH/scripts/playlet_bili_daily.py" --topics "霸总,甜宠,总裁,虐恋"
# 查询悬疑/反转题材
python3 "$SKILL_PATH/scripts/playlet_bili_daily.py" --topics "悬疑,推理,反转,惊悚"
Custom query logic:
- All themes provided by the user are queried at once through the batch API, without the need to call them one by one
- Query results are automatically deduplicated; theme clustering and trend analysis are both generated based on the query results
- Pre-validation (v2.2): Before querying, first determine whether the keyword/category matches the short drama theme lexicon (time travel/CEO romance/rebirth/sweet romance/suspense/counterattack/period drama/war god/costume drama, etc.). If not, clearly remind "The keyword does not meet short drama query conditions" andrecommend related categories and keywords(prioritize extracting theme words from invalid words, then supplement with popular themes)
- Zero requests for invalid conditions (v2.3): When none of the keywords/categories match the short drama theme lexicon,do not request any API(including probing), directly prompt and recommend, then stop; in mixed-word scenarios, retain valid keywords and continue querying, while automatically ignoring invalid words
- Keyword fallback (v2.1): When a keyword matches the theme lexicon but no matching data is found after querying, the script automatically degrades to a full query to obtain data, and clearly informs the user: "The keyword did not match; full data has been automatically obtained for you." No manual confirmation is required
Output format (mandatory)
⛔ Strictly enforce rules:
- The following template isthe only legal output format, and any free improvisation, omission, simplification, or reorganization is prohibited
- Do not output any extra content not defined in the template (such as colloquial text like "Let me help you..." or "The following is...")
- Do not merge or skip any section; even if a section's data is "No data", its section title must still be retained
- After the daily report is generated, the conversation replymay onlycontain the following content, and must not contain any other text
- Do notappend any execution-plan-type guidance reminders such as "📝 Write a complete execution plan?" at the end of the daily report (explicitly requested by the user to be removed on 2026-08-18)
After each daily report run, the conversation outputmust strictlybe output as-is according to the following template (only replace the {...} placeholders):
## 短剧-B站信息源 · {日期} 日报
**扫描 {N} 部热门短剧,聚类 {M} 个题材方向**
---
### 题材概览
| 题材 | 数量 | 占比 | 爆款亮点 |
|------|------|------|---------|
| #{题材名} | {N}部 | {X}% | 头部作品亮点描述 |
| ... | ... | ... | ... |
---
### 创作趋势分析
**一、新兴起量信号**
- 🔥 **#{题材}** — 仅{N}部但均互动{X}+,描述
(若无新兴题材,输出:暂无新兴起量信号)
**二、爆款标题特征**
| 特征模式 | 出现次数 | 典型案例 | 平均互动 |
|---------|---------|---------|---------|
| {特征1} | {N}次 | 《{标题}》 | {X}w |
| ... | ... | ... | ... |
(若无标题数据,输出:暂无爆款标题数据)
**三、核心达人榜**
| 达人 | 作品数 | 总赞 | 代表作 |
|------|--------|------|--------|
| @{达人} | {N}部 | {X}w | 《{作品}》 |
| ... | ... | ... | ... |
(若无达人数据,输出:暂无核心达人数据)
**四、题材趋势报告**
**题材**:#{题材1}
**作品数**:{N}部
**平均点赞**:{X}w
**头部作品**:《{标题}》-{点赞}w
**题材特征**:{描述该题材的共性特征}
**创作建议**:{针对该题材的创作建议}
**五、#{题材2}**
(同上格式)
**六、#{题材3}**
(同上格式)
**七、跨题材对比建议**
- **{题材}** — 建议同步关注{相关题材}的联动创作,观察题材融合趋势
(若无建议,输出:暂无跨题材对比建议)
---
**日报地址**:{HTML文件绝对路径}
> 数据说明:每日15:00更新昨天的数据
The above format isa mandatory specification, all fields cannot be omitted, and the section titles (I, II, III, IV, V, VI, VII) must be retained. If a module has no data, mark "No data" within that section; do not delete the section itself.
Command Quick Reference
| Command/Parameter | Function | Default Value |
|---|---|---|
--latest |
Automatically use the latest date with data (fall back up to 7 days, skipping intervals without data) | — |
--date YYYY-MM-DD |
Query by specified date (when out of the valid range, remind + recommend the nearest date; when not updated, automatically fall back) | Today |
--topics "关键词,..." |
Custom theme query, comma-separated (when none match the theme words, do not request the API and directly prompt + recommend; for mixed words, retain the valid words) | Full query |
--count N |
Number of works to scan, stop when satisfied | 200 |
--start-time |
Custom start time YYYY-MM-DD HH:MM:SS | — |
--end-time |
Custom end time YYYY-MM-DD HH:MM:SS | — |
--output-dir |
Output directory | ~/Downloads/QoderReports |
--api-key |
Specify API Key (overrides environment variable) | — |
--subscribe |
Enable daily subscription | — |
--unsubscribe |
Disable daily subscription | — |
--from-cache |
Use cached data | — |
Use Cases
Scenario 1: Topic selection reference for short drama creators
Role: Short drama screenwriter/director
Needs: Understand current popular short drama themes and hit trends on Bilibili to guide creative direction
How to use:
- Check the short drama daily report every day and pay attention to theme clustering distribution
- Analyze the characteristics of hit titles and interaction data
- Lay out content in advance for emerging rising themes
Expected benefits: Accurately grasp traffic trends and increase the probability of work exposure
Scenario 2: MCN agency content operations
Role: MCN operations personnel
Needs: Track the short drama content performance of affiliated creators and optimize operational strategies
How to use:
- Subscribe to the daily report and continuously track the Bilibili short drama track
- Understand competitor performance through the core creator rankings
- Use custom theme queries to conduct targeted analysis of areas of interest
Expected benefits: Improve content operations efficiency and promptly discover potential creators
Scenario 3: Brand/production-side competitor monitoring
Role: Short drama production company
Needs: Monitor the performance data of competitor short dramas on Bilibili
How to use:
- Regularly query daily reports for target themes
- Analyze the title characteristics and interaction patterns of competing hit works
- Suggest exploring integrated creation based on cross-genre comparisons
Expected Benefits: Data-driven content investment decisions, reducing trial-and-error costs
Project Architecture
Directory Structure
短剧-B站信息源/
├── SKILL.md # Skill主文档(本文件)
├── scripts/
│ └── playlet_bili_daily.py # 核心脚本(v2.3.1:前置校验零请求/相关词命中直查/推荐/探活/自动回退/无数据确认制)
└── references/
├── core_workflow.md # 核心执行流程、字段映射、HTML规则
└── examples.md # 使用示例与常见用法组合
Tech Stack
| Project | Description |
|---|---|
| Runtime Environment | Python 3 |
| Development Language | Python (script playlet_bili_daily.py) |
| Data Interface | HTTP call to RedFox Hub Bilibili short drama API (queryPlayletMsgs,platform=6) |
| Frontend Rendering | HTML generates daily report (Bilibili Blue #00A1D6 theme color,<img> lazy loading, BV number direct link) |
| Source Identifier | source: "短剧B站信息源-GitHub" |
Data Flow
用户查询 → 前置输入校验(关键词命中题材词库-题材名+相关词) → 日期预检(真实探活) → API调用(queryPlayletMsgs) → 数据去重 → 题材聚类 → HTML日报生成 → 浏览器打开
↓(关键词/分类全部不满足) ↓(日期未更新/超范围) ↓(数据不足) ↓(关键词无匹配)
不请求接口,直接提示+推荐停止 自动回退最近有数据日期并告知 提示推荐题材等待确认(不自动扩展) 提示推荐题材等待确认(不自动降级全量)
↓
终端输出趋势分析报告
FAQ
Usage-related
Q1: Why does querying "today"'s data prompt that it is not updated?
A: Data is updated daily at 15:00 for the previous day's data (the actual update time may be delayed). Before 15:00, the latest available date is the day before yesterday; after 15:00, it is yesterday.No manual handling required——when the query date is not updated or exceeds the query time range, the script will automatically fall back to obtain data from the most recent time range and clearly inform "the current query time is not updated or exceeds the query time range, the most recent time range data has been automatically obtained for you"; you can also use --latest to directly locate the most recent date with data.
Q2: How do I query short dramas of a specific genre?
A: Use the --topics parameter, separating multiple genres with commas, such as --topics "穿越,霸总,重生". All genres are queried in batches at once, with no need to call them one by one. Before querying, the script willfirst validate keywords/categories: only those that match the short drama genre lexicon (time travel/CEO romance/rebirth/suspense/sweet romance/counterattack, etc.) participate in the query; when none match,no API is requested, and it directly reminds "the keywords do not meet the short drama query conditions" andrecommends related categories and keywords, while in mixed-word scenarios it retains valid keyword queries.
Q3: Where is the daily report generated?
A: By default, it is saved in the ~/Downloads/QoderReports/ directory, with the filename format 短剧B站日报_YYYY-MM-DD.html, and after generation it automatically opens in the browser.
Q4: How do I enable/disable the daily subscription?
A: Use --subscribe to enable daily automatic output,--unsubscribe disable it.
Troubleshooting
Q5: What should I do if the script reports UnicodeEncodeError when running?
A: This is a GBK encoding issue with Windows PowerShell. Set the environment variable before execution:$env:PYTHONIOENCODING='utf-8', then rerun the script.
Q6: It prompts "REDFOX_API_KEY environment variable not found"?
A: Please configure the environment variable according to the "One-click Installation" section. After configuring it, Windows users need torestart the terminalfor it to take effect.
Q7: Images in the HTML daily report fail to load?
A: Bilibili CDN (hdslb.com) has no hotlink protection restrictions, so this issue usually does not occur. If you encounter it, please check the network connection or whether the image URL has expired.
Bilibili Short Drama Modification Notes (Migrated from the Douyin Version)
Q8: What are the differences between the Bilibili version and the Douyin version?
A: The main modification points are as follows:
| Modification Item | Douyin Version | Bilibili version |
|---|---|---|
| platform parameter | 1 | 6 |
| Theme color | #FB7299 (pink) | #00A1D6 (blue) |
| Link format | douyin.com/video/{id} | bilibili.com/video/{BV number} |
| File name | Short Drama Douyin Daily Report | Short Drama Bilibili Daily Report |
| Image hotlink protection | referrerpolicy required | Not required (Bilibili CDN has no restrictions) |
| Displayed metrics | Views/Likes/Comments | Shares/Likes/Comments (zero values hidden) |
| url field | Valid | None (concatenate using BV number) |
Field mapping detailsSee core_workflow.md
Verification checklist
- Script syntax is correct (py_compile passes)
- API endpoint address updated to Bilibili
- platform parameter changed to 6 (Bilibili)
- photoId is in BV number format, used to concatenate links
- readCount has real data, but is not displayed
- shareCount displayed as share count
- likeCount used as the primary sorting metric
- url field is None, concatenate bilibili.com link using BV number
- coverUrl is Bilibili CDN (hdslb.com), referrerpolicy not required
- HTML theme color changed to Bilibili blue (#00A1D6)
- Metrics displayed: Shares/Likes/Comments (zero values hidden)
- Link format: bilibili.com/video/{BV number}
- source field: Short Drama Bilibili Info Source-GitHub
Get help
If you have other questions, you can submit an Issue through the project GitHub repository.
📚 Reference documentation
- core_workflow.md — Core execution flow, field mapping, HTML rules, metric display rules, comparison of differences with Douyin
- examples.md — Usage examples and common usage combinations