Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

erispulse_biliparser-1.0.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

erispulse_biliparser-1.0.4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file erispulse_biliparser-1.0.4.tar.gz.

File metadata

  • Download URL: erispulse_biliparser-1.0.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for erispulse_biliparser-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5874045a175d9fb15d1235bf56b8651cfe350b1204e5273caf3f7ad6899220a6
MD5 ce6a6189cd3852de404c8a67fe934778
BLAKE2b-256 0756dd5b095eb8977b9322f6146805f63d8c1a351e9ca1cea44c8a85ef561c84

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_biliparser-1.0.4.tar.gz:

Publisher: python-publish.yml on wsu2059q/ErisPulse-BiliParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file erispulse_biliparser-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for erispulse_biliparser-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 16ae4eb5c1c48bf8adb5487d1a2ab6133490d040a315cd601d14d881947f4bdc
MD5 c5d3dc95f2acda826aac5d14f5bb555c
BLAKE2b-256 ffc8dfabc26dcc9ba04cc1b6eabf19f763c2f0dd854c75270eb8037f1acfe737

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_biliparser-1.0.4-py3-none-any.whl:

Publisher: python-publish.yml on wsu2059q/ErisPulse-BiliParser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page