📖 介绍
b站封面提取,动态图片/专栏图片下载
本插件使用了 go-cqhttp 的 send_group_forward_msg 和 send_private_forward_msg 接口 来发送合并转发消息,使用了 upload_group_file 和 upload_private_file 接口 来上传文件
发送私聊合并转发消息需要使用 v1.0.0-rc2 版本以上的 go-cqhttp
上传私聊文件需要使用 v1.0.0-rc3 版本以上的 go-cqhttp
💿 安装
使用 nb-cli 安装
在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装nb plugin install nonebot-plugin-bilibili-image
使用包管理器安装
在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install nonebot-plugin-bilibili-image
pdm
pdm add nonebot-plugin-bilibili-image
poetry
poetry add nonebot-plugin-bilibili-image
conda
conda install nonebot-plugin-bilibili-image
打开 nonebot2 项目的 bot.py 文件, 在其中写入
nonebot.load_plugin('nonebot-plugin-bilibili-image')
从 github 安装
在 nonebot2 项目的插件目录下, 打开命令行, 输入以下命令克隆此储存库git clone https://github.com/jcjrobert/nonebot-plugin-bilibili-image.git
打开 nonebot2 项目的 bot.py 文件, 在其中写入
nonebot.load_plugin('src.plugins.nonebot-plugin-bilibili-image')
⚙️ 配置
在 nonebot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| max_forward_msg_num | 否 | 99 | 合并转发消息条数上限 |
| bilibili_image_save_local | 否 | false | 是否将下载的压缩包保存在本地 |
如果选择保存在本地,保存的压缩包将会在机器人运行目录下的 data/download/下
🎉 使用
指令表
| 指令 | 说明 |
|---|---|
| b站封面/B站封面 + bv号/url/短链接 | 可以直接附上bv号,也可以直接用的分享链接,会先提取链接然后处理,不支持av号(因为基本用不到) |
| 动态图片/动态下载/动态获取 + 动态id/url/短链接 | 同上 |
| 专栏图片/专栏下载/专栏获取 + cv号/url/短链接 | 同上 |
除了b站封面获取,都会在获取后发送文件和转发信息,转发信息用于预览(图片画质会压缩),发送文件用于使用
📝 更新日志
💡 特别感谢
- noneplugin/nonebot-plugin-imagetools Nonebot2 简单图片操作插件
📄 开源许可
本项目使用AGPL-3.0许可证开源
Metadata
Release files for nonebot-plugin-bilibili-image 0.0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nonebot-plugin-bilibili-image-0.0.2.1.tar.gz | 20.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_bilibili_image-0.0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / nonebot-plugin-bilibili-image-0.0.2.1.tar.gz
| Download URL | nonebot-plugin-bilibili-image-0.0.2.1.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bdf0f74b825faee1374e35383746b9f2d368e2969353ed3ae23c35bce47b547c
|
|
BLAKE2b-256 checksum How to use checksums |
c9260330459d1c1079b5c886c3bd1e5c2b46318796748436c4e4aaf6b1af1245
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / nonebot_plugin_bilibili_image-0.0.2.1-py3-none-any.whl
| Download URL | nonebot_plugin_bilibili_image-0.0.2.1-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9c165f99d4cf41a2364141050e4646a7223fab3c152aecc2f975739938fec20
|
|
BLAKE2b-256 checksum How to use checksums |
9303aaf4f0f6aa9fddc3075210369192306245379cf37e5308b84f376b733afd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for nonebot-plugin-bilibili-image 0.0.2.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.