Skip to main content
logo

✨ nonebot-plugin-bilidyn ✨

LICENSE python

uv ruff

📖 介绍

跨平台实现的B站动态、直播订阅插件。参考了 bilibili-dynamic-mirai-plugin 的绘图风格。

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-bilidyn --upgrade

使用 pypi 源安装

nb plugin install nonebot-plugin-bilidyn --upgrade -i "https://pypi.org/simple"

使用清华源安装

nb plugin install nonebot-plugin-bilidyn --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
uv
uv add nonebot-plugin-bilidyn

安装仓库 main 分支

uv add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main
pdm
pdm add nonebot-plugin-bilidyn

安装仓库 main 分支

pdm add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main
poetry
poetry add nonebot-plugin-bilidyn

安装仓库 main 分支

poetry add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_bilidyn"]

⚙️ 配置

插件使用 nonebot_plugin_localstore 储存数据和缓存。

配置项 必填 默认值 说明
BILI_DYNAMIC_MODE 否 per_up per_up 逐 UP 拉取;follow_feed 使用登录账号的聚合关注流
BILI_DYNAMIC_INTERVAL 否 30 动态检测间隔,单位秒
BILI_LIVE_INTERVAL 否 30 直播检测间隔,单位秒
BILI_LOW_SPEED_START 否 1 低频时段起始小时
BILI_LOW_SPEED_END 否 9 低频时段结束小时
BILI_LOW_SPEED_MULTIPLIER 否 10 低频时段检测倍率
BILI_THEME_COLOR 否 #D3EDFA 卡片主题色,多个颜色之间使用分号分隔。
BILI_FONT_FILE 否 - 自定义卡片字体文件名或路径

per_up 逐个拉取 UP 动态,无需关注 UP,但关注数较多时会产生较多网络请求;follow_feed 自动关注订阅的 UP,换号、缺失时补齐关注,并从关注流筛选推送,在关注人数较多时请求消耗更少。

BILI_FONT_FILE 填写文件名时,从 localstore 插件配置目录下的 fonts/ 读取;填写相对路径时,相对 Bot 运行目录读取;填写绝对路径则直接使用。

BILI_FONT_FILE=LXGWZhenKaiGB-Regular.ttf
# 或复用 Bot 目录中的已有字体
BILI_FONT_FILE=fonts/LXGWZhenKaiGB-Regular.ttf

登录失效时,插件会向最后一次成功登录所在的私聊发送一次提醒。

🎉 使用

指令表

指令 权限 说明
bili / bili help 无 查看帮助文本
bili sub <UID> 私聊 / 管理 / 超管 为当前会话订阅指定 UP 主
bili unsub <UID / 名称> 私聊 / 管理 / 超管 取消当前会话对指定 UP 主的订阅
bili list 无 查看当前会话订阅列表
bili login 私聊, 超管 发起二维码登录
bili new <UID / 名称> [count] 无 主动查看某位 UP 主最近动态,默认 1 条,最多 5 条

🎨 效果图

动态卡片效果图

直播卡片效果图

红色主题动态卡片效果图

红色主题直播卡片效果图

Metadata

Release files for nonebot-plugin-bilidyn 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-bilidyn 0.4.1
File Size Uploaded Provenance Actions
nonebot_plugin_bilidyn-0.4.1.tar.gz 51.3 kB Without provenance Details for nonebot_plugin_bilidyn-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-bilidyn 0.4.1
File Interpreter ABI Platform Actions
nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl Python 3 none any Details for nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl

Total release size: 121.0 kB

Release files / nonebot_plugin_bilidyn-0.4.1.tar.gz

Download URL nonebot_plugin_bilidyn-0.4.1.tar.gz
Size 51.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cb83b17cbe618060c19680257a557066afe42ce308e2300dd465a90b8462d0a2
BLAKE2b-256 checksum
How to use checksums
8b542b852b233aeb70b4451f995bc7a063485d38eb694e933ebc1e6bb87158e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl

Download URL nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl
Size 69.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee550d99c707c6a8a27daf73e128ac634ced951568ba311baa8bf3eb5d945589
BLAKE2b-256 checksum
How to use checksums
1c844f4f1905e92cd4b249323348e2ca9303e2952656dca9a840ea170dd0937e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for nonebot-plugin-bilidyn 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page