Nonebot2 plugin for bilibili sharing detail
Project description
提前声明
- 本插件并不提供视频下载能力(个人觉得群聊里出现大量下载的视频片段挺烦的,经常触发自动下载还占用手机和电脑的空间)。
- 只适配和测试了 onebot v11 适配器的场景,其他环境未做处理,不确保可用性。
📖 介绍
这是一个 nonebot2 插件项目,支持对群聊内分享 B 站视频进行相关信息的解析与提取。
- 对于群聊里出现的 B 站小程序、卡片分享,提取对应链接,方便 PC 端打开;
- 对于只有视频链接的情况,补充视频封面、详情等信息。
- 评论区热评截图预览,可供判断视频质量(截图基于 nonebot-plugin-htmlrender 插件)。
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-bili-helper
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-bili-helper
pdm
pdm add nonebot-plugin-bili-helper
poetry
poetry add nonebot-plugin-bili-helper
conda
conda install nonebot-plugin-bili-helper
打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入
plugins = ["nonebot_plugin_template"]
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| analysis_whitelist | 否 | 无 | 触发人白名单(留空时为所有人) |
| analysis_group_whitelist | 否 | 无 | 目标群组白名单(留空时为所有群组) |
| analysis_blacklist | 否 | 无 | 触发人黑名单 |
| analysis_group_blacklist | 否 | 无 | 目标群组黑名单 |
| analysis_group_strategies | 否 | 无 | 群组策略(格式为 dict[str, list],其中 list 为 'detail', 'link', 'comments' 组成的数组。如配置 { "123": ["comments"] } 说明对群组 123 仅做评论解析) |
🎉 使用
指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
|---|---|---|---|---|
| 设置B站Cookie | 主人 | 否 | 私聊 | 设置请求时的Cookie(以便获得更详细的评论数据) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_bili_helper-0.9.1.tar.gz.
File metadata
- Download URL: nonebot_plugin_bili_helper-0.9.1.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bba23b37acd96fc21b9d9f7d49b314b41c19fa5c555c0fdc5520202bdd22aaa6
|
|
| MD5 |
272976cb20249cff73214411fbdf6b98
|
|
| BLAKE2b-256 |
d4598eac2cc96f3201be374a9de0de154bd232090d4ac8b145dab3ef40106a2f
|
File details
Details for the file nonebot_plugin_bili_helper-0.9.1-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_bili_helper-0.9.1-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d299baf75660fce05bfc944a6828cf3f6eb1bd702e48a8ad7154a61d5b35195
|
|
| MD5 |
adcfed8c791bbf9a529a1b2d5890a4f4
|
|
| BLAKE2b-256 |
c17f106b2ee51fc7c301584eb4d2f2148f01ce9148cfb25e9a7e71fc5c8b823b
|