An open API service indexing awesome lists of open source software.

https://github.com/catandA/BilibiliBOT-1

哔哩视频推荐机器人
https://github.com/catandA/BilibiliBOT-1

Last synced: 30 days ago
JSON representation

哔哩视频推荐机器人

Awesome Lists containing this project

README

        

# catandBOT_Shiro



这是基于[Shiro](https://github.com/MisakaTAT/Shiro/) 的QQ机器人, 开发用于指向性的视频创作推广引流。

想要快速在自己的服务器上运行它,可以参见[快速开始](https://github.com/catandA/BilibiliBOT-1/blob/main/QuickStart_zh_cn.md)

另外需要使用任意支持反向WebSocket的OneBot协议客户端,比如[cq-http](https://github.com/Mrs4s/go-cqhttp)

另外此项目也使用了来自 [spring-mirai-server](https://github.com/protobufbot/spring-mirai-server) 仓库的Bot日志代码

## 目前功能列表

- 定时推荐配置文件指定的视频(详见content.json)
- 根据”视频推荐“指令作视频推荐
- 自动解析聊天里面的哔哩哔哩直链分享并显示出完整信息

示例:
![示例](https://github.com/catandA/BilibiliBOT-1/blob/main/.README_images/9584a2c7.png)

## JVM参数说明

### -DconfigFile

> 已知问题: 由于自动创建JSON没有写, 需要自己创建好这个Json, [格式参考](#配置文件说明)

设置配置文件路径, 不填则为 ./content.json

```shell
java -DconfigFile=~/bot/config-dir/config.json -jar ~/bot/bot.jar
```

## 配置文件说明

> 实际JSON不存在注释, 下方代码带有注释仅为帮助理解

```json5
{
"targetGroups": [
// 目标群组, 可以为多个, 但是有封号风险
"1145141919",
"1919810114"
// ...
],
"bilibiliVideos": [
// 推荐视频列表
{
"name": "视频名称",
"type": "视频类型", // 例如: 游戏PV
"url": "BVRTx4090" // 视频BV号, 我也不知道为什么叫做url
}
]
}
```

## 技术框架

本项目使用Spring框架与[Shiro](https://github.com/MisakaTAT/Shiro/), 对 [哔哩哔哩的公开API](https://api.bilibili.com/x/web-interface/view?bvid=${bid}) 进行HTTPS请求, 获取到JSON格式数据之后反序列化读取,并进行QQ消息构造再传回前端发送数据

## 相关链接

- Shiro [https://github.com/MisakaTAT/Shiro/](https://github.com/MisakaTAT/Shiro/)
- onebot [https://github.com/botuniverse/onebot](https://github.com/botuniverse/onebot)
- spring-mirai-server [https://github.com/protobufbot/spring-mirai-server](https://github.com/protobufbot/spring-mirai-server)

# License

This product is licensed under the GNU General Public License version 3. The license is as published by the Free Software Foundation published at [https://www.gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html).

Alternatively, this product is licensed under the GNU Lesser General Public License version 3 for non-commercial use. The license is as published by the Free Software Foundation published at [https://www.gnu.org/licenses/lgpl-3.0.html](https://www.gnu.org/licenses/lgpl-3.0.html).

Feel free to contact us if you have any questions about licensing or want to use the library in a commercial closed source product.