← 返回 Skills 市场
456
总下载
1
收藏
2
当前安装
4
版本数
在 OpenClaw 中安装
/install 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...
使用说明 (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:方法与局限说明
安全使用建议
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.
功能分析
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'.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install bilibili-danmaku - 安装完成后,直接呼叫该 Skill 的名称或使用
/bilibili-danmaku触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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
元数据
常见问题
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 456 次。
如何安装 Bilibili Danmaku?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install bilibili-danmaku」即可一键安装,无需额外配置。
Bilibili Danmaku 是免费的吗?
是的,Bilibili Danmaku 完全免费(开源免费),可自由下载、安装和使用。
Bilibili Danmaku 支持哪些平台?
Bilibili Danmaku 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Bilibili Danmaku?
由 陈希瑞(@smartloe)开发并维护,当前版本 v1.0.3。
推荐 Skills