You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split README into per-language files and add CLAUDE.md
- README.md: English only, links to translated docs
- docs/README_zh.md: Chinese documentation
- docs/README_ja.md: Japanese documentation
- CLAUDE.md: project conventions and development guide
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bili-Streamer is a cross-platform Bilibili live stream management tool that simulates the official Android BiliLive client. It provides both a PyQt6 GUI and a CLI interface.
6
+
7
+
## Architecture
8
+
9
+
-`bilibili_stream.py` — Core API layer. All Bilibili API interactions live here (login, start/stop live, category/title management, device fingerprint). Both GUI and CLI consume this as a library.
10
+
-`gui.py` — PyQt6 GUI application. Imports functions from `bilibili_stream.py`. All network calls run in `QThread` workers to keep the UI responsive.
-**Single global DeviceFingerprint instance** — accessed via `get_device_fp()` singleton. All functions share the same device identity for consistency.
16
+
-**Single global requests.Session** — accessed via `get_http_session()`. Reuses TCP connections and enforces 30s default timeout.
17
+
-**Device fingerprint is persisted to `device.json`** — generated once, reused across sessions. All header fields (BUVID, Display-ID, Session-ID, network type) are stable per device.
18
+
-**BUVID format** — must be `XX` + 32-char lowercase hex (MD5). Never use `random.sample` with uppercase chars.
19
+
-**Build number consistency** — all API calls must read `build` from `device_fp.fingerprint["build_number"]`, never hardcode.
20
+
21
+
## Anti-Detection / Risk Control Rules
22
+
23
+
These are critical for avoiding account bans:
24
+
25
+
- Never randomize per-request fields that real clients keep stable (Display-ID, Session-ID, network type in UA)
26
+
- User-Agent must not contain identifiable third-party markers (no hardcoded emails, tool names)
27
+
- Use `except Exception:` not bare `except:` — bare except catches KeyboardInterrupt/SystemExit
28
+
- All HTTP requests must go through `get_http_session()` with timeout
29
+
- APP_KEY `1d8b6e7d45233436` and APP_SECRET are the standard Android client keys — do not change unless Bilibili revokes them
Copy file name to clipboardExpand all lines: README.md
+9-124Lines changed: 9 additions & 124 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
A cross-platform tool for managing Bilibili live streams. Simulates the official Android streaming client to start/stop broadcasts, change stream categories, and update titles — with both a GUI and CLI interface.
Pre-built executables for **macOS** and **Windows** are available on the [Releases](https://github.com/WIndFate/Bili-Streamer/releases) page. No Python installation required.
70
+
71
+
## Build from Source
68
72
69
73
```bash
70
74
pip install pyinstaller
@@ -81,6 +85,9 @@ The output will be in the `dist/` folder.
0 commit comments