← Back to Skills Marketplace
456
Downloads
1
Stars
2
Active Installs
4
Versions
Install in OpenClaw
/install bilibili-danmaku
Description
Fetch and analyze Bilibili video danmaku (bullet comments) from a Bilibili video URL/BVID, then output keyword frequency, SVG word cloud, sentiment distribut...
README (SKILL.md)
Bilibili Danmaku
Quick Start
- 安装依赖(首次必做):
bash {baseDir}/scripts/ensure_env.sh
- 抓取弹幕:
python3 {baseDir}/scripts/fetch_danmaku.py --url "\x3Cbilibili_video_url>" --outdir "{baseDir}/output"
- 运行分析(jieba + 清洗 + SnowNLP + 高密度词云PNG):
bash {baseDir}/scripts/analyze.sh "\x3Cdanmaku_csv_path>" "\x3Cmeta_json_path>" "{baseDir}/output" "\x3Ctask_name>"
- 可选:增加自定义清洗词
--stopwords-file:传入自定义停用词文件(可重复)--extra-stopwords:临时追加停用词(逗号分隔)- 示例:
"{baseDir}/.venv/bin/python" {baseDir}/scripts/analyze_danmaku.py --csv "\x3Ccsv>" --meta "\x3Cmeta>" --outdir "{baseDir}/output" --name task_clean --extra-stopwords "妈妈,亲戚,这边"
Workflow
1. 获取输入
- 输入支持:
- B站视频 URL(推荐)
--bvid+--page(分P视频)--cid(高级模式,直接指定分P)
2. 抓取弹幕
- 用
fetch_danmaku.py自动完成:bvid -> cid解析- 下载
comment.bilibili.com/{cid}.xml - 导出:
*_danmaku.csv/*_danmaku.json/*_corpus.txt/*_meta.json
3. 分析与产出
- 用
analyze_danmaku.py对 CSV 弹幕文本执行:jieba分词关键词统计(JSON)- 数据清洗(停用词、噪声词、超高文档频率短词剔除)
SnowNLP情感分布统计(JSON)- 高密度词云图(PNG)
- 舆情报告(Markdown)
Output Files
默认输出目录:{baseDir}/output
主要产物:
*_top_words.json*_sentiment.json*_wordcloud.png*_report.md
Recommended Usage Notes
- 先抓“单视频单P”验证链路,再做批量任务。
- SnowNLP 情感分析适合快速运营判断;高风险场景仍需人工复核。
- 若用户要“更稳健结论”,优先扩大样本(多P/多视频)再汇总。
Resources
scripts/ensure_env.sh:安装依赖(jieba/snownlp/wordcloud)requirements.txt:Python依赖清单scripts/fetch_danmaku.py:抓取与导出弹幕scripts/analyze_danmaku.py:jieba词频、清洗、SnowNLP情感、舆情报告scripts/fetch.sh/scripts/analyze.sh:便捷命令封装references/stopwords.default.txt:默认干扰词词表references/methodology.md:方法与局限说明
Usage Guidance
This project appears coherent for danmaku collection and analysis. Before installing: (1) be aware ensure_env.sh will create a local virtualenv and pip-install packages from PyPI — review requirements.txt if you have strict supply-chain policies; (2) the fetch script makes network calls to api.bilibili.com and comment.bilibili.com (expected), so running it requires network access and may be subject to Bilibili's terms of service—confirm your use is permitted; (3) run in an isolated environment if you prefer (container or VM) to limit filesystem/network scope; (4) if you plan to supply custom stopword files or point analyze to arbitrary CSVs, ensure those inputs are trustworthy to avoid processing unexpected content.
Capability Analysis
Type: OpenClaw Skill
Name: bilibili-danmaku
Version: 1.0.3
The skill bundle is designed for legitimate Bilibili danmaku analysis. However, the `analyze_danmaku.py` and `fetch_danmaku.py` scripts accept user-controlled paths for `--outdir`, `--csv`, `--meta`, and `--stopwords-file`. This creates a local file read/write vulnerability, as a malicious actor could potentially direct the agent to read sensitive files or overwrite system files if they can control these input arguments. While the shell scripts (`analyze.sh`, `fetch.sh`) properly quote arguments passed to Python, the Python scripts themselves do not fully sanitize these paths against arbitrary file access, which is a significant security flaw, classifying it as 'suspicious' rather than 'benign'.
Capability Assessment
Purpose & Capability
Name/description align with the included scripts: fetch_danmaku.py calls Bilibili APIs and downloads comment XML; analyze_danmaku.py performs jieba tokenization, SnowNLP sentiment, and wordcloud generation. No unrelated capabilities or unexpected credentials are requested.
Instruction Scope
SKILL.md directs running the provided scripts (ensure_env.sh, fetch_danmaku.py, analyze_danmaku.py). The instructions only touch files under the skill folder and the generated output; they do not instruct reading system files or exporting data to third-party endpoints beyond the expected Bilibili APIs.
Install Mechanism
No registry install spec; runtime helper ensure_env.sh creates a local virtualenv and pip-installs packages from requirements.txt (PyPI). This is expected for a Python analysis tool but does perform network downloads and installs third-party Python packages (jieba, snownlp, wordcloud, pillow, numpy).
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The code does not attempt to read secrets or other environment variables beyond normal operation.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It only creates a local .venv and output files in a chosen directory.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install bilibili-danmaku - After installation, invoke the skill by name or use
/bilibili-danmaku - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
README CN/EN: sync image paths and add img demo section
v1.0.2
Update CN/EN README with img input-output and wordcloud examples
v1.0.1
Add demo word cloud image in README (CN/EN)
v1.0.0
Initial release: jieba + SnowNLP + cleaning + report
Metadata
Frequently Asked Questions
What is Bilibili Danmaku?
Fetch and analyze Bilibili video danmaku (bullet comments) from a Bilibili video URL/BVID, then output keyword frequency, SVG word cloud, sentiment distribut... It is an AI Agent Skill for Claude Code / OpenClaw, with 456 downloads so far.
How do I install Bilibili Danmaku?
Run "/install bilibili-danmaku" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Bilibili Danmaku free?
Yes, Bilibili Danmaku is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Bilibili Danmaku support?
Bilibili Danmaku is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Bilibili Danmaku?
It is built and maintained by 陈希瑞 (@smartloe); the current version is v1.0.3.
More Skills