Name | bilili JSON |
Version |
1.4.15
JSON |
| download |
home_page | |
Summary | 🍻 bilibili video and danmaku downloader | B站视频、弹幕下载器 |
upload_time | 2023-10-05 13:31:09 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | GPLv3 |
keywords |
python
bilibili
video
download
spider
danmaku
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 𝓫𝓲𝓵𝓲𝓵𝓲
<p align="center">
<img src="./docs/.vuepress/public/logo.png" width="500px">
</p>
<p align="center">
<a href="https://bilibili.com" target="_blank"><img src="https://img.shields.io/badge/bilibili-1eabc9.svg?logo=bilibili&logoColor=white&style=flat-square" alt="Bilibili"></a>
<a href="https://python.org/" target="_blank"><img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/bilili?logo=python&style=flat-square"></a>
<a href="https://pypi.org/project/bilili/" target="_blank"><img src="https://img.shields.io/pypi/v/bilili?style=flat-square" alt="pypi"></a>
<a href="https://pypi.org/project/bilili/" target="_blank"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/bilili?style=flat-square"></a>
<a href="https://actions-badge.atrox.dev/yutto-dev/bilili/goto?ref=main"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fyutto-dev%2Fbilili%2Fbadge%3Fref%3Dmain&label=API%20Test&style=flat-square" /></a>
<a href="LICENSE"><img alt="LICENSE" src="https://img.shields.io/github/license/yutto-dev/bilili?style=flat-square"></a>
<a href="https://gitmoji.dev"><img src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67?style=flat-square" alt="Gitmoji"></a>
</p>
<p align="center"><strong>🍻 𝓫𝓲𝓵𝓲𝓵𝓲,一个可以帮你快速下载 <a href="https://www.bilibili.com">B 站</a>投稿视频以及番剧视频的 CLI~~~</strong></p>
**文档戳这里啦 → [bilili の可愛い自己紹介](https://bilili.nyakku.moe)**
如果想要体验 v2 请戳这里 → [yutto<sup>2.0.0-beta</sup>](https://github.com/yutto-dev/yutto)
## 特性
- 支持投稿视频(也即原 AV 号视频)和番剧下载
- 多线程 + 分块下载,总之就是很快啦
- 断点续传,即便一次没下完也可以接着下载
- 弹幕支持,自动下载弹幕并可转换为 ASS 弹幕
## 快速开始
`bilili` 可以从以下两种视频主页获取视频
- 投稿视频主页:
- `https://www.bilibili.com/video/avxxxxxx`
- `https://b23.tv/avxxxxxx`
- `https://www.bilibili.com/video/BVxxxxxx`
- `https://b23.tv/BVxxxxxx`
- 番剧视频主页:
- `https://www.bilibili.com/bangumi/media/mdxxxxxx`
- `https://www.bilibili.com/bangumi/play/ssxxxxxx`
- `https://b23.tv/ssxxxxxx`
- `https://www.bilibili.com/bangumi/play/epxxxxxx`
- `https://b23.tv/epxxxxxx`
### 安装 FFmpeg
由于大多数格式需要合并,所以 bilili 依赖于 FFmpeg,你需要事先安装好它
Windows 请[手动下载](https://ffmpeg.org/download.html)并解压后,存放到任意文件夹下,之后将 `ffmpeg.exe` 所在文件夹**添加到环境变量**
而如果是 macOS 或者 Linux 发行版,这一步可以很方便地通过包管理器一键完成啦~
最后你可以通过直接在终端运行 `ffmpeg -version` 测试是否安装成功
### 安装 bilili
#### pip 安装
现在 bilili 支持通过 pip 一键安装
```bash
pip install bilili
```
#### 源码安装
此外你还可以从 GitHub 上下载最新的源码进行安装
```bash
git clone git@github.com:yutto-dev/bilili.git
cd bilili/
pip install .
```
### 运行
你只需要这样就可以运行 bilili 啦~
```bash
bilili <url>
```
当然,你需要将 `<url>` 替换为前面的视频主页 url
## 参数
bilili 还支持很多参数,但参数使用方法等内容此处不作赘述,详情请访问[文档](https://bilili.nyakku.moe/cli/)
- `-t`/`--type` 选择下载类型(`flv` or `dash` or `mp4`),默认为 dash 类型,注意该参数仅代表下载源格式,所有格式最后均会转为 mp4
- `-d`/`--dir` 指定存储目录,默认为项目根目录
- `-q`/`--quality` 指定清晰度,默认为 `127`(8K 超高清)
- `-n`/`--num-threads` 指定最大下载线程数,默认为 16
- `-p`/`--episodes` 选集,默认为 `^~$`(全选)
- `-s`/`--with-section` 同时下载附加剧集( PV、预告以及特别篇等专区内容)
- `-w`/`--overwrite` 强制覆盖已下载视频
- `-c`/`--sess-data` 传入 `cookies` 中的 `SESSDATA`
- `-y`/`--yes` 跳过下载询问
- `--audio-quality` 指定音频质量等级,默认为 `30280`(320kbps)
- `--playlist-type` 指定播放列表类型,支持 `dpl` 和 `m3u` ,默认为 `dpl`,设置为 `no` 即不生成播放列表
- `--danmaku` 指定弹幕类型,支持 `xml` 和 `ass`,如果设置为 `no` 则不下载弹幕,默认为 `xml` 弹幕
- `--block-size` 分块下载器的块大小,单位为 MB,默认为 128MB,设置为 0 时禁用分块下载
- `--abs-path` 修改播放列表路径类型为绝对路径
- `--use-mirrors` 启用从多个镜像下载功能
- `--disable-proxy` 禁用系统代理 「Beta」
- `--no-color` 不使用任何颜色
- `--debug` 开启 `debug` 模式
## 参与贡献
请阅读 [CONTRIBUTING.md](CONTRIBUTING.md)
Raw data
{
"_id": null,
"home_page": "",
"name": "bilili",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "python,bilibili,video,download,spider,danmaku",
"author": "",
"author_email": "Nyakku Shigure <sigure.qaq@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/9b/5f/cfecf72500c227a876a106d47deb4db771bf05e0ae1d7a22dafd0f2a8c50/bilili-1.4.15.tar.gz",
"platform": null,
"description": "# \ud835\udceb\ud835\udcf2\ud835\udcf5\ud835\udcf2\ud835\udcf5\ud835\udcf2\n\n<p align=\"center\">\n <img src=\"./docs/.vuepress/public/logo.png\" width=\"500px\">\n</p>\n\n<p align=\"center\">\n <a href=\"https://bilibili.com\" target=\"_blank\"><img src=\"https://img.shields.io/badge/bilibili-1eabc9.svg?logo=bilibili&logoColor=white&style=flat-square\" alt=\"Bilibili\"></a>\n <a href=\"https://python.org/\" target=\"_blank\"><img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/bilili?logo=python&style=flat-square\"></a>\n <a href=\"https://pypi.org/project/bilili/\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/bilili?style=flat-square\" alt=\"pypi\"></a>\n <a href=\"https://pypi.org/project/bilili/\" target=\"_blank\"><img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/bilili?style=flat-square\"></a>\n <a href=\"https://actions-badge.atrox.dev/yutto-dev/bilili/goto?ref=main\"><img alt=\"Build Status\" src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fyutto-dev%2Fbilili%2Fbadge%3Fref%3Dmain&label=API%20Test&style=flat-square\" /></a>\n <a href=\"LICENSE\"><img alt=\"LICENSE\" src=\"https://img.shields.io/github/license/yutto-dev/bilili?style=flat-square\"></a>\n <a href=\"https://gitmoji.dev\"><img src=\"https://img.shields.io/badge/gitmoji-%20\ud83d\ude1c%20\ud83d\ude0d-FFDD67?style=flat-square\" alt=\"Gitmoji\"></a>\n</p>\n\n<p align=\"center\"><strong>\ud83c\udf7b \ud835\udceb\ud835\udcf2\ud835\udcf5\ud835\udcf2\ud835\udcf5\ud835\udcf2\uff0c\u4e00\u4e2a\u53ef\u4ee5\u5e2e\u4f60\u5feb\u901f\u4e0b\u8f7d <a href=\"https://www.bilibili.com\">B \u7ad9</a>\u6295\u7a3f\u89c6\u9891\u4ee5\u53ca\u756a\u5267\u89c6\u9891\u7684 CLI\uff5e\uff5e\uff5e</strong></p>\n\n**\u6587\u6863\u6233\u8fd9\u91cc\u5566 \u2192 [bilili \u306e\u53ef\u611b\u3044\u81ea\u5df1\u7d39\u4ecb](https://bilili.nyakku.moe)**\n\n\u5982\u679c\u60f3\u8981\u4f53\u9a8c v2 \u8bf7\u6233\u8fd9\u91cc \u2192 [yutto<sup>2.0.0-beta</sup>](https://github.com/yutto-dev/yutto)\n\n## \u7279\u6027\n\n- \u652f\u6301\u6295\u7a3f\u89c6\u9891\uff08\u4e5f\u5373\u539f AV \u53f7\u89c6\u9891\uff09\u548c\u756a\u5267\u4e0b\u8f7d\n- \u591a\u7ebf\u7a0b + \u5206\u5757\u4e0b\u8f7d\uff0c\u603b\u4e4b\u5c31\u662f\u5f88\u5feb\u5566\n- \u65ad\u70b9\u7eed\u4f20\uff0c\u5373\u4fbf\u4e00\u6b21\u6ca1\u4e0b\u5b8c\u4e5f\u53ef\u4ee5\u63a5\u7740\u4e0b\u8f7d\n- \u5f39\u5e55\u652f\u6301\uff0c\u81ea\u52a8\u4e0b\u8f7d\u5f39\u5e55\u5e76\u53ef\u8f6c\u6362\u4e3a ASS \u5f39\u5e55\n\n## \u5feb\u901f\u5f00\u59cb\n\n`bilili` \u53ef\u4ee5\u4ece\u4ee5\u4e0b\u4e24\u79cd\u89c6\u9891\u4e3b\u9875\u83b7\u53d6\u89c6\u9891\n\n- \u6295\u7a3f\u89c6\u9891\u4e3b\u9875\uff1a\n - `https://www.bilibili.com/video/avxxxxxx`\n - `https://b23.tv/avxxxxxx`\n - `https://www.bilibili.com/video/BVxxxxxx`\n - `https://b23.tv/BVxxxxxx`\n- \u756a\u5267\u89c6\u9891\u4e3b\u9875\uff1a\n - `https://www.bilibili.com/bangumi/media/mdxxxxxx`\n - `https://www.bilibili.com/bangumi/play/ssxxxxxx`\n - `https://b23.tv/ssxxxxxx`\n - `https://www.bilibili.com/bangumi/play/epxxxxxx`\n - `https://b23.tv/epxxxxxx`\n\n### \u5b89\u88c5 FFmpeg\n\n\u7531\u4e8e\u5927\u591a\u6570\u683c\u5f0f\u9700\u8981\u5408\u5e76\uff0c\u6240\u4ee5 bilili \u4f9d\u8d56\u4e8e FFmpeg\uff0c\u4f60\u9700\u8981\u4e8b\u5148\u5b89\u88c5\u597d\u5b83\n\nWindows \u8bf7[\u624b\u52a8\u4e0b\u8f7d](https://ffmpeg.org/download.html)\u5e76\u89e3\u538b\u540e\uff0c\u5b58\u653e\u5230\u4efb\u610f\u6587\u4ef6\u5939\u4e0b\uff0c\u4e4b\u540e\u5c06 `ffmpeg.exe` \u6240\u5728\u6587\u4ef6\u5939**\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf**\n\n\u800c\u5982\u679c\u662f macOS \u6216\u8005 Linux \u53d1\u884c\u7248\uff0c\u8fd9\u4e00\u6b65\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u4e00\u952e\u5b8c\u6210\u5566\uff5e\n\n\u6700\u540e\u4f60\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u5728\u7ec8\u7aef\u8fd0\u884c `ffmpeg -version` \u6d4b\u8bd5\u662f\u5426\u5b89\u88c5\u6210\u529f\n\n### \u5b89\u88c5 bilili\n\n#### pip \u5b89\u88c5\n\n\u73b0\u5728 bilili \u652f\u6301\u901a\u8fc7 pip \u4e00\u952e\u5b89\u88c5\n\n```bash\npip install bilili\n```\n\n#### \u6e90\u7801\u5b89\u88c5\n\n\u6b64\u5916\u4f60\u8fd8\u53ef\u4ee5\u4ece GitHub \u4e0a\u4e0b\u8f7d\u6700\u65b0\u7684\u6e90\u7801\u8fdb\u884c\u5b89\u88c5\n\n```bash\ngit clone git@github.com:yutto-dev/bilili.git\ncd bilili/\npip install .\n```\n\n### \u8fd0\u884c\n\n\u4f60\u53ea\u9700\u8981\u8fd9\u6837\u5c31\u53ef\u4ee5\u8fd0\u884c bilili \u5566\uff5e\n\n```bash\nbilili <url>\n```\n\n\u5f53\u7136\uff0c\u4f60\u9700\u8981\u5c06 `<url>` \u66ff\u6362\u4e3a\u524d\u9762\u7684\u89c6\u9891\u4e3b\u9875 url\n\n## \u53c2\u6570\n\nbilili \u8fd8\u652f\u6301\u5f88\u591a\u53c2\u6570\uff0c\u4f46\u53c2\u6570\u4f7f\u7528\u65b9\u6cd5\u7b49\u5185\u5bb9\u6b64\u5904\u4e0d\u4f5c\u8d58\u8ff0\uff0c\u8be6\u60c5\u8bf7\u8bbf\u95ee[\u6587\u6863](https://bilili.nyakku.moe/cli/)\n\n- `-t`/`--type` \u9009\u62e9\u4e0b\u8f7d\u7c7b\u578b\uff08`flv` or `dash` or `mp4`\uff09\uff0c\u9ed8\u8ba4\u4e3a dash \u7c7b\u578b\uff0c\u6ce8\u610f\u8be5\u53c2\u6570\u4ec5\u4ee3\u8868\u4e0b\u8f7d\u6e90\u683c\u5f0f\uff0c\u6240\u6709\u683c\u5f0f\u6700\u540e\u5747\u4f1a\u8f6c\u4e3a mp4\n- `-d`/`--dir` \u6307\u5b9a\u5b58\u50a8\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u9879\u76ee\u6839\u76ee\u5f55\n- `-q`/`--quality` \u6307\u5b9a\u6e05\u6670\u5ea6\uff0c\u9ed8\u8ba4\u4e3a `127`\uff088K \u8d85\u9ad8\u6e05\uff09\n- `-n`/`--num-threads` \u6307\u5b9a\u6700\u5927\u4e0b\u8f7d\u7ebf\u7a0b\u6570\uff0c\u9ed8\u8ba4\u4e3a 16\n- `-p`/`--episodes` \u9009\u96c6\uff0c\u9ed8\u8ba4\u4e3a `^~$`\uff08\u5168\u9009\uff09\n- `-s`/`--with-section` \u540c\u65f6\u4e0b\u8f7d\u9644\u52a0\u5267\u96c6\uff08 PV\u3001\u9884\u544a\u4ee5\u53ca\u7279\u522b\u7bc7\u7b49\u4e13\u533a\u5185\u5bb9\uff09\n- `-w`/`--overwrite` \u5f3a\u5236\u8986\u76d6\u5df2\u4e0b\u8f7d\u89c6\u9891\n- `-c`/`--sess-data` \u4f20\u5165 `cookies` \u4e2d\u7684 `SESSDATA`\n- `-y`/`--yes` \u8df3\u8fc7\u4e0b\u8f7d\u8be2\u95ee\n- `--audio-quality` \u6307\u5b9a\u97f3\u9891\u8d28\u91cf\u7b49\u7ea7\uff0c\u9ed8\u8ba4\u4e3a `30280`\uff08320kbps\uff09\n- `--playlist-type` \u6307\u5b9a\u64ad\u653e\u5217\u8868\u7c7b\u578b\uff0c\u652f\u6301 `dpl` \u548c `m3u` \uff0c\u9ed8\u8ba4\u4e3a `dpl`\uff0c\u8bbe\u7f6e\u4e3a `no` \u5373\u4e0d\u751f\u6210\u64ad\u653e\u5217\u8868\n- `--danmaku` \u6307\u5b9a\u5f39\u5e55\u7c7b\u578b\uff0c\u652f\u6301 `xml` \u548c `ass`\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3a `no` \u5219\u4e0d\u4e0b\u8f7d\u5f39\u5e55\uff0c\u9ed8\u8ba4\u4e3a `xml` \u5f39\u5e55\n- `--block-size` \u5206\u5757\u4e0b\u8f7d\u5668\u7684\u5757\u5927\u5c0f\uff0c\u5355\u4f4d\u4e3a MB\uff0c\u9ed8\u8ba4\u4e3a 128MB\uff0c\u8bbe\u7f6e\u4e3a 0 \u65f6\u7981\u7528\u5206\u5757\u4e0b\u8f7d\n- `--abs-path` \u4fee\u6539\u64ad\u653e\u5217\u8868\u8def\u5f84\u7c7b\u578b\u4e3a\u7edd\u5bf9\u8def\u5f84\n- `--use-mirrors` \u542f\u7528\u4ece\u591a\u4e2a\u955c\u50cf\u4e0b\u8f7d\u529f\u80fd\n- `--disable-proxy` \u7981\u7528\u7cfb\u7edf\u4ee3\u7406 \u300cBeta\u300d\n- `--no-color` \u4e0d\u4f7f\u7528\u4efb\u4f55\u989c\u8272\n- `--debug` \u5f00\u542f `debug` \u6a21\u5f0f\n\n## \u53c2\u4e0e\u8d21\u732e\n\n\u8bf7\u9605\u8bfb [CONTRIBUTING.md](CONTRIBUTING.md)\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "\ud83c\udf7b bilibili video and danmaku downloader | B\u7ad9\u89c6\u9891\u3001\u5f39\u5e55\u4e0b\u8f7d\u5668",
"version": "1.4.15",
"project_urls": {
"Documentation": "https://bilili.nyakku.moe/",
"Homepage": "https://github.com/yutto-dev/bilili"
},
"split_keywords": [
"python",
"bilibili",
"video",
"download",
"spider",
"danmaku"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3db76d1142325bfe7214c0f37ba45f9908a53f52132747c04968a6e39ea0161",
"md5": "056a692ca35c56e80939d3d6ebc0a01d",
"sha256": "8973b2ff2370c26a25a2b94b1f76cb48701a1689cc7f6ac3a6558f13b123f96d"
},
"downloads": -1,
"filename": "bilili-1.4.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "056a692ca35c56e80939d3d6ebc0a01d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 51960,
"upload_time": "2023-10-05T13:31:07",
"upload_time_iso_8601": "2023-10-05T13:31:07.825618Z",
"url": "https://files.pythonhosted.org/packages/b3/db/76d1142325bfe7214c0f37ba45f9908a53f52132747c04968a6e39ea0161/bilili-1.4.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9b5fcfecf72500c227a876a106d47deb4db771bf05e0ae1d7a22dafd0f2a8c50",
"md5": "9cfc27b60af041112af81dc07b600572",
"sha256": "902210cc3ac259af0d1b215fa9a16b059a62ee423b72985eb563b66e2b2800c1"
},
"downloads": -1,
"filename": "bilili-1.4.15.tar.gz",
"has_sig": false,
"md5_digest": "9cfc27b60af041112af81dc07b600572",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 46994,
"upload_time": "2023-10-05T13:31:09",
"upload_time_iso_8601": "2023-10-05T13:31:09.560211Z",
"url": "https://files.pythonhosted.org/packages/9b/5f/cfecf72500c227a876a106d47deb4db771bf05e0ae1d7a22dafd0f2a8c50/bilili-1.4.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-05 13:31:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yutto-dev",
"github_project": "bilili",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "bilili"
}