Skip to main content

B站视频解析模块,自动解析视频链接并展示详细信息、热门评论与弹幕

Project description

ErisPulse-BiliParser

B站视频解析模块,自动解析消息中的B站视频链接并展示详细信息。

功能

  • 自动检测消息中的B站视频链接(支持 BV号、AV号、完整链接、b23.tv短链接)
  • 手动 /bili 命令解析
  • 输出封面图 + 视频详情(标题、UP主、播放量、弹幕、点赞、投币、收藏、分享)
  • 热门评论展示
  • 多平台富文本适配(HTML > Markdown > 纯文本自动回退)
  • 解析结果缓存

安装

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  # 单条消息最多解析视频数

使用

自动解析

在群聊或私聊中发送包含B站链接的消息,模块会自动解析:

看看这个视频 https://www.bilibili.com/video/BV1xx411c7mD

手动命令

/bili BV1xx411c7mD
/bili av2
/bili https://b23.tv/xxxxx

支持的链接格式

格式 示例
BV号 BV1xx411c7mD
AV号 av2
完整链接 https://www.bilibili.com/video/BV1xx411c7mD
短链接 https://b23.tv/xxxxx

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.0.tar.gz (6.9 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.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: erispulse_biliparser-1.0.0.tar.gz
  • Upload date:
  • Size: 6.9 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.0.tar.gz
Algorithm Hash digest
SHA256 995922b1c2e70525b0b5f4c59188eee45c3cb1eaee5092857c84435778918f53
MD5 620f3ef38de7383cb331bf0cd75cf2e3
BLAKE2b-256 eb398fcfefecd21d16ecd1ce5b39636f9da9aed6d3d3627968c00cc530cf651c

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_biliparser-1.0.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for erispulse_biliparser-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d2bf390bc66b5d0de7ee8100fa9a2d7020d4b09fa2fd93ef95395ac170454ff
MD5 927553129bfff3d846a811d3e43c6b2b
BLAKE2b-256 e60d1f19d6248c4556223d689e4c8026943939d6ea1f6757dfb59da412072c97

See more details on using hashes here.

Provenance

The following attestation bundles were made for erispulse_biliparser-1.0.0-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