B站视频解析模块,自动解析视频链接并展示详细信息、热门评论与弹幕
Project description
ErisPulse-BiliParser
B站视频解析模块,自动解析消息中的B站视频链接并展示详细信息。
功能
- 自动检测消息中的B站视频链接(支持 BV号、AV号、完整链接、b23.tv短链接)
- 手动
/bili命令解析 - 输出封面图 + 视频详情(标题、UP主、播放量、弹幕、点赞、投币、收藏、分享)
- 热门评论展示
- 多平台富文本适配(HTML > Markdown > 纯文本自动回退)
- 解析结果缓存
- 直接下载视频:消息中包含"看看/想看/播放/下载"等关键词 + 视频链接,直接发送视频文件
- 交互式下载:解析视频信息后,30秒内回复"我要看这个"即可下载视频
安装
epsdk install BiliParser
配置
在 config.toml 中添加:
[BiliParser]
auto_parse = true # 自动解析消息中的B站链接
show_cover = true # 发送封面图
show_comments = true # 显示热门评论
comment_count = 3 # 显示评论数量
show_description = false # 显示视频简介
max_desc_length = 100 # 简介最大长度
cache_ttl = 600 # 缓存过期时间(秒)
max_videos_per_message = 3 # 单条消息最多解析视频数
enable_download = true # 启用视频下载功能
download_cooldown = 60 # 下载冷却时间(秒)
max_file_size = 104857600 # 最大文件大小(字节,默认100MB)
使用
自动解析
发送包含B站链接的消息,模块自动解析并展示视频信息:
看看这个视频 https://www.bilibili.com/video/BV1xx411c7mD
直接下载视频
消息中同时包含视频链接和观看关键词(看看/想看/我要看/播放/下载等),直接发送视频文件,不显示解析信息:
看看这个视频 av170001
我想看 https://b23.tv/xxxxx
下载 BV1xx411c7mD
交互式下载
普通解析后会提示"想看这个视频吗?回复:我要看这个",在60秒内回复即可触发下载。
手动命令
/bili BV1xx411c7mD
/bili av2
/bili https://b23.tv/xxxxx
/bili b23.tv/xxxxx
支持的链接格式
| 格式 | 示例 |
|---|---|
| BV号 | BV1xx411c7mD |
| AV号 | av2 |
| 完整链接 | https://www.bilibili.com/video/BV1xx411c7mD |
| 短链接 | https://b23.tv/xxxxx |
| 无协议短链接 | b23.tv/xxxxx |
触发下载的关键词
看看 想看 我要看 我想看 看这个 看看这个 看视频 播放 下载 发视频 发来 watch play download video
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 erispulse_biliparser-1.1.1.tar.gz.
File metadata
- Download URL: erispulse_biliparser-1.1.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8b17232f75634569405ae2315885a60d260813da948e3cd9e3255814995c3f2
|
|
| MD5 |
149ee83648ebccd77df3aadc8e9c2027
|
|
| BLAKE2b-256 |
5eafd956f7cd1e1139b2d08308edef77d8bc97acfb0e35a48a5d8ee296e791d6
|
Provenance
The following attestation bundles were made for erispulse_biliparser-1.1.1.tar.gz:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-BiliParser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_biliparser-1.1.1.tar.gz -
Subject digest:
b8b17232f75634569405ae2315885a60d260813da948e3cd9e3255814995c3f2 - Sigstore transparency entry: 1765911417
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-BiliParser@3a928590a5191b6a0177293a9590e6d0b78db005 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a928590a5191b6a0177293a9590e6d0b78db005 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file erispulse_biliparser-1.1.1-py3-none-any.whl.
File metadata
- Download URL: erispulse_biliparser-1.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ef401075ee8d4211aad769604707b4382202f9629c95894e9f688216cab01d3
|
|
| MD5 |
b7d26d04cc17c28f1e5772c37f5aaa7b
|
|
| BLAKE2b-256 |
08899033952933fbdf928a073b91d0adb693222ed3abf42f964c90741880a27e
|
Provenance
The following attestation bundles were made for erispulse_biliparser-1.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on wsu2059q/ErisPulse-BiliParser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
erispulse_biliparser-1.1.1-py3-none-any.whl -
Subject digest:
6ef401075ee8d4211aad769604707b4382202f9629c95894e9f688216cab01d3 - Sigstore transparency entry: 1765911703
- Sigstore integration time:
-
Permalink:
wsu2059q/ErisPulse-BiliParser@3a928590a5191b6a0177293a9590e6d0b78db005 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wsu2059q
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a928590a5191b6a0177293a9590e6d0b78db005 -
Trigger Event:
workflow_dispatch
-
Statement type: