✨ first commit
This commit is contained in:
commit
0d7c17b486
4 changed files with 287 additions and 0 deletions
56
README.md
Normal file
56
README.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Bili-Danmu
|
||||
|
||||
将 BiliBili 直播间的弹幕通过 [ServerTap](https://servertap.io/) 转发到 Spigot 服务器中
|
||||
|
||||
## ServerTap 设置
|
||||
|
||||
从 [ServerTap 的 GitHub Release](https://github.com/phybros/servertap/releases/tag/v0.3.0) 下载,放到 `plugins` 文件夹中,启动服务器,生成配置。
|
||||
|
||||
脚本**暂未支持 TLS 认证,仅支持 HTTP + KeyAuth**。在 ServerTap 的配置文件(`plugins/ServerTap/config.yml`)中,修改端口与 key,记下备用。
|
||||
|
||||
## 运行脚本
|
||||
|
||||
### 安装依赖
|
||||
|
||||
建议使用虚拟环境:
|
||||
|
||||
```bash
|
||||
python3 -m venv env
|
||||
source env/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 参数说明
|
||||
|
||||
#### 使用示例
|
||||
|
||||
ServerTap 的默认设置是开启 KeyAuth,密钥为 `change_me`,可以直接用以下命令连接,其中 `room_id` 是直播间房间号:
|
||||
|
||||
```
|
||||
./main.py --room <room_id> --key change_me
|
||||
```
|
||||
|
||||
如果脚本与 ServerTap 不在同一台机器上,或改变了 ServerTap 的端口号,可以通过以下参数调整:
|
||||
|
||||
| 参数 | 说明 |
|
||||
| ------ | -------------------------------------------------- |
|
||||
| --room | 直播房间号,**必须** |
|
||||
| --host | ServerTap 的主机名,默认为 `127.0.0.1` |
|
||||
| --port | ServerTap 的端口,默认为 `4567` |
|
||||
| --key | ServerTap 的认证 Key,如果不设置认证则不需要此参数 |
|
||||
|
||||
脚本自带帮助:
|
||||
|
||||
```
|
||||
$ ./main.py -h
|
||||
usage: main.py [-h] --room ROOM [--host HOST] [--port PORT] [--key KEY]
|
||||
|
||||
将 B 站直播间弹幕通过 ServerTap 转发到 Spigot 服务器
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
--room ROOM 直播房间号
|
||||
--host HOST ServerTap 的 IP
|
||||
--port PORT ServerTap 的端口
|
||||
--key KEY ServerTap 的认证信息
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue