Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brucezhang1993/open-bilibili-link
Open source Bilibili Link client on Linux (WIP)
https://github.com/brucezhang1993/open-bilibili-link
Last synced: about 1 month ago
JSON representation
Open source Bilibili Link client on Linux (WIP)
- Host: GitHub
- URL: https://github.com/brucezhang1993/open-bilibili-link
- Owner: BruceZhang1993
- License: lgpl-3.0
- Created: 2020-07-06T01:47:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T02:29:30.000Z (6 months ago)
- Last Synced: 2024-10-04T13:45:38.351Z (about 1 month ago)
- Language: Python
- Size: 164 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Open Bilibili Link
Working in progress#### Development
```shell script
pipenv install
# Print help
python3 -m open_bilibili_link --help
# Run GUI to default page
python3 -m open_bilibili_link gui
# Login from Cli
python3 -m open_bilibili_link login [Username] [Password]
# Checkin for current account
python3 -m open_bilibili_link checkin
```#### Commands
```
gui ([OBL链接]) 启动图形界面
login ([用户名] [密码]) (--login_type=cookie) 登录
checkin 直播中心签到
danmu [直播间ID] ([--output=stdout|file]) 直播弹幕鸡 -- 支持输出到文件 文件可在 OBS 中加载为聊天模式文本源
logout 退出登录
```#### Cookie 登录流程
_如帐号密码登录异常请使用 Cookie 登录方式_
- F12 打开浏览器调试工具
- 进入 [直播个人中心](https://link.bilibili.com/p/center/index) 并登录
- 点击任意 XHR 类型请求,右侧 Request Header 请求头完整复制 Cookie
- 执行 `python3 -m open_bilibili_link login --login_type=cookie`
- 粘贴完整 Cookie 并回车
- 可执行 `python3 -m open_bilibili_link checkin` 测试签到接口是否正常
- 执行 `python3 -m open_bilibili_link gui` 打开图形界面#### Features
- [x] 帐号密码登录
- [x] Cookie 登录
- [x] 直播签到
- [x] 用户基础信息
- [x] 直播间信息
- [x] 获取直播码
- [x] 开始和关闭直播
- [x] 一键开播(获取直播码->生成OBS配置->开启直播->启动OBS)
- [x] 一键下播(退出OBS后->手动/自动关闭直播)
- [x] 生成 OBS 配置
- [x] 启动 OBS
- [x] 简单弹幕视图
- [x] 简单弹幕视图支持发送普通弹幕
- [ ] 弹幕颜色 字体大小 样式等等
- [x] 同步弹幕到文件 (OBS 可加载为弹幕视图)More...
#### Structure
```text
├── LICENSE # LGPL3
├── open_bilibili_link # Package root
│ ├── __init__.py
│ ├── __main__.py # Starter file
│ ├── __meta__.py # Project meta constant
│ ├── models.py # Models from JSON string
│ ├── plugins # Plugin root
│ │ ├── __init__.py
│ │ └── test.py
│ ├── services.py # Bilibili API services
│ ├── utils.py # Some helper functions and classes
│ └── widgets # GUI root
│ ├── components # Components root
│ │ ├── areas.py # Live area components
│ │ ├── button.py # Custom button components
│ │ ├── danmu.py # Danmu components
│ │ ├── dialog.py # Custom dialog
│ │ ├── __init__.py
│ │ ├── label.py # Custom label component
│ │ ├── live.py # Live control panel
│ │ ├── toast.py # Toast component support auto dismiss
│ │ └── usercard.py # Usercard components shows user infomations
│ ├── images # Image resources
│ │ └── bilibili.svg
│ ├── __init__.py
│ ├── main.py # Main window here
│ ├── menu.py # Left menu
│ ├── pages # Pages root
│ │ ├── home.py # Home page
│ │ ├── __init__.py
│ │ └── test.py # Test page
│ ├── routes.py # Router helper to load pages
│ └── styles # Qss files root
│ └── material.qss # Custom default dark theme
├── open-bilibili-link.iml # Project configuration for JetBrains IDE
├── Pipfile # pipenv configuration
└── README.md # Readme file
```#### Powered by
- Qt5 & PyQt5 & asyncqt: _GUI & GUI asynchronous event loop_
- asyncio & aiohttp: _Asynchronous IO & network_
- rsa: _RSA encryption_
- pydantic: _JSON model & validation_
- pipenv(dev): _Virtualenv manager_#### License
This project is licensed under [LGPL3](https://github.com/BruceZhang1993/open-bilibili-link/blob/master/LICENSE).