Skip to main content

BiliX 项目图标

BiliX

Bilibili 视频下载器,提供命令行及 PySide6 图形界面,支持扫码登录、批量与多 P 下载、清晰度/编码/音轨选择,以及下载后的媒体校验。

项目主页 · GitHub · PyPI · Windows 下载 · 更新记录

项目状态

当前版本为 1.7.9,修复 Windows 绿色版更新后未替换或重启的问题;旧绿色版需一次手动迁移。运行中追加队列、会话内暂停续传、1–4 项并发、画质提示、命名模板和代理继续保留。发行与验收状态见本版记录,后续功能见待办清单。

Python 包要求 3.11 或更新版本。Windows GUI/CLI 独立程序和 Linux deb 无需 Python/Qt;Windows 包内置 FFmpeg,deb 安装系统 FFmpeg 依赖。原生 GUI 面向 Windows 10 x64 与 Ubuntu 22.04/24.04、Debian 12/13 amd64;macOS 当前提供 CLI Python 包。每版真实验证范围见 文档索引。

安装

安装命令行 Python 版本:

uv tool install djhx-bilix
blx --help

也可使用 pip install djhx-bilix。blx 与 bilix 为同一程序的两个命令名;模块入口为 python -m djhx_bilix。更新运行 uv tool upgrade djhx-bilix。

Windows 从 GitHub Releases 下载,并按发行页的 SHA256 校验文件。GUI 绿色版直接运行 EXE,同时保存配套许可证与源码 ZIP;安装版运行 Setup EXE。CLI 解压 ZIP 后,在 PowerShell 当前目录使用 ./bilix.exe。

Ubuntu/Debian GUI 安装下载的 deb:

# 将 VERSION 换为发行页所选版本,文件名以下载结果为准。
sudo apt install ./djhx-bilix-gui_VERSION-1_amd64.deb
bilix-gui

安装请采用发行页提供的文件并核对 SHA256。也可使用 uv tool install 'djhx-bilix[gui]' 或 pip install 'djhx-bilix[gui]' 安装 GUI,然后运行 bilix-gui。Python 方式需自行安装 FFmpeg 并加入 PATH,或在 GUI 设置/CLI --ffmpeg 中指定路径。

从源码开发或运行 GUI:

uv sync --locked --extra gui --group gui-test
uv run --locked --extra gui bilix-gui

GUI 与 CLI 共用下载内核、账号和配置。功能流程见图形版使用说明,更新设置、手动升级和签名 APT 源见安装与更新,源码构建发行文件见GUI 构建与发行。用户配置与下载文件独立保存。

自动更新从 1.7.6 GUI 发行版开始支持,旧版请手动安装新版;不受支持的系统不提供更新兼容。CLI 和 pip/源码环境使用原安装方式升级。

历史设计、各版验收和未测范围保留在 文档索引。GUI 会话内续传不跨重启;公开 JSONL 和持久历史仍待开发。

快速开始

blx auth login
blx auth status
blx info BV1j4411W7F7
blx download BV1j4411W7F7 --dry-run
blx download BV1j4411W7F7 --save videos -q 1080p

用手机 Bilibili App 扫码并确认;凭据保存在用户配置目录。默认选择当前账号实际可获取的最高视频清晰度与 AAC 音轨。清晰度/编码不可用时提示降级;要求精确匹配时使用 --strict。

blx download BV12R4y1J75d --page 1,3,5-7
blx download --file videos.txt --quiet
blx download BV1j4411W7F7 --codec HEVC --audio best
blx config
blx doctor

多 P 默认选择全部,含 ?p=2 的链接默认选择 P2;--page 优先于链接。批量文件每行一个 URL/BV 号,支持 UTF-8/BOM、空行与 # 注释。

已有同名文件默认跳过;--overwrite 在新文件完成下载、校验与合并后才替换旧文件。失败保留 .bilix-* 临时材料,返回非零退出码。详细参数见 blx download --help 与 用法说明。

终端体验

1.5.0 支持 Bash、Zsh、Fish、Windows PowerShell 5.1 与 PowerShell 7 的 Tab 补全,覆盖命令、参数、清晰度、编码、音轨和本地路径。PowerShell 当前会话可这样启用:

blx completion powershell | Out-String | Invoke-Expression

blx donwload 会提示相近的 download,参数解析错误返回退出码 2。启用方式、持久配置与排错见 补全说明。

文档

所有文档从 docs/README.md 进入。没有会话上下文的开发人员或 AI 先读 开发交接,再按任务选择入口。

任务 文档
CLI、登录与补全 使用 · 账号 · 补全
GUI 使用、安装与更新 GUI 使用 · 安装/更新/APT
共享内核与模块职责 架构
从源码开发与构建 开发/CLI · GUI 原生包
统一回归、原生平台与结果规则 测试
最终产物、签名、发布与部署 维护者流程
已发布范围、未实现功能、当前缺陷 版本范围 · backlog · workflow issues
当版证据、历史设计/研究 完整索引
贡献、安全与第三方材料 贡献 · 安全 · 许可材料

官网源码为 site/bilix.html,样式、图像与脚本内嵌,无需构建;页面维护与浏览器检查见 site/README.md。官网、安装包、签名更新和 APT 的服务器部署统一使用 bilix@djhx.site 与现有专用 SSH 密钥,精确顺序见 发布流程。

开发

CLI 日常验证:

uv sync --locked
uv run --locked python scripts/validate.py --profile cli

GUI 或共享内核:

uv sync --locked --extra gui --group gui-test
uv run --locked --extra gui --group gui-test python scripts/validate.py --profile gui

统一入口生成独立日志与 JSON/XML,核对版本身份,GUI 依赖缺失直接失败。完整 FFmpeg、skip 处理、原生桌面与发布检查见 testing.md。项目使用本地检查与手动发布,不运行 GitHub/Gitea Actions;推送代码或标签不会自动部署。

许可与使用边界

项目采用 GPL-3.0-only,使用、修改与再分发遵循其条款。软件许可与视频内容的版权、平台授权属于不同事项。

仅下载你拥有访问与保存权限的内容,遵守所在地法律、版权要求与平台条款。程序不绕过账号权限、单独购买权限或 DRM;试看媒体明确拒绝下载。软件按许可证提供,不作担保。

扫码凭据、Cookie、二维码链接与签名媒体地址不应出现在公开问题、日志或提交中。见 安全政策。

致谢

项目参考了 Bilibili API 资料、BBDown 和 早期实现。当前应用图标由维护者原创,源稿见 bilix.svg;历史图标保存在 docs/assets。本项目并非 Bilibili 官方产品。

Metadata

Release files for djhx-bilix 1.7.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djhx-bilix 1.7.9
File Size Uploaded Provenance Actions
djhx_bilix-1.7.9.tar.gz 13.8 MB Without provenance Details for djhx_bilix-1.7.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djhx-bilix 1.7.9
File Interpreter ABI Platform Actions
djhx_bilix-1.7.9-py3-none-any.whl Python 3 none any Details for djhx_bilix-1.7.9-py3-none-any.whl

Total release size: 15.7 MB

Release files / djhx_bilix-1.7.9.tar.gz

Download URL djhx_bilix-1.7.9.tar.gz
Size 13.8 MB
Tags Source
SHA-256 checksum
How to use checksums
ec7ac2fc8c04da849c305bac303971ca565aa094f82ea3398b4b4e8d8b118fa8
BLAKE2b-256 checksum
How to use checksums
8c0a9558ee7b95f4c87069edbb1818a1a02805d7106ddd404bd3b1563d045e4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.4

Release files / djhx_bilix-1.7.9-py3-none-any.whl

Download URL djhx_bilix-1.7.9-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
fc15f5978453fe29e8ffd86178e58df3da56d671eb28e280b5f460df68682cdc
BLAKE2b-256 checksum
How to use checksums
17290cc10c25003c3fe46e9b6e5a7fb7668aa7cb255fb4816ba81229959514fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.4

Security for djhx-bilix 1.7.9

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page