{"id":13430347,"url":"https://github.com/niuhuan/bili-cli-rs","last_synced_at":"2025-08-15T21:42:24.580Z","repository":{"id":41524126,"uuid":"457724000","full_name":"niuhuan/bili-cli-rs","owner":"niuhuan","description":"[RUST] 一个Rust的Bilibili视频下载器","archived":false,"fork":false,"pushed_at":"2023-06-19T02:34:21.000Z","size":310,"stargazers_count":141,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T18:14:05.981Z","etag":null,"topics":["anime","bilibili","bilibili-download","comics","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niuhuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-10T10:02:07.000Z","updated_at":"2025-03-23T00:02:11.000Z","dependencies_parsed_at":"2024-10-31T22:02:13.020Z","dependency_job_id":"1dbcf840-2e1f-48f6-afd9-50ddbfc6d39f","html_url":"https://github.com/niuhuan/bili-cli-rs","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":0.0714285714285714,"last_synced_commit":"abbe6c5dcb7d5bddecfbb5f59ad4937e36247b06"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/niuhuan/bili-cli-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbili-cli-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbili-cli-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbili-cli-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbili-cli-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niuhuan","download_url":"https://codeload.github.com/niuhuan/bili-cli-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbili-cli-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270632760,"owners_count":24619576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anime","bilibili","bilibili-download","comics","rust","rust-lang"],"created_at":"2024-07-31T02:00:52.503Z","updated_at":"2025-08-15T21:42:24.523Z","avatar_url":"https://github.com/niuhuan.png","language":"Rust","funding_links":[],"categories":["下载工具"],"sub_categories":["直播脚本"],"readme":"bili-cli\n=========\n\n哔哩哔哩视频命令行下载器\n\n## 用户界面\n\n![](images/down_bv.gif)\n\n## 实现功能\n\n- [x] 用户\n  - [x] 登录\n  - [x] 个人信息\n- [x] 视频下载\n  - [x] 高清视频下载并合并\n  - [x] BV下载\n  - [x] EP/SS下载\n  - [x] 来自手机的短视频/短链接\n  - [x] 断点续传\n    - [x] dash模式 (-r 参数)\n  - [x] 集合下载时选择EP\n  - [x] 下载收藏夹\n\n## 如何使用\n\n```shell\n\n###  登录线管\n\n# 登录你的账号\n./bili-cli login\n\n# 在控制台打印二维码\n./bili-cli login -c\n\n# 登录后显示自己的信息\n\n./bili-cli user\n\n### 下载相关\n\n# 打印下载帮助\n./bili-cli down -h\n\n# 下载BV （ID或者URL）\n./bili-cli down BV1814y1p7Uj\n./bili-cli down https://www.bilibili.com/video/BV1W44y1Y7mQ/?spm_id_from=333.999.0.0\n\n# 下载合集或番剧 (随便找一集，把url贴进去，会下载这个动漫的所有季，所有集，并放好文件夹)\n./bili-cli down https://www.bilibili.com/bangumi/play/ss4188?spm_id_from=333.337.0.0\n# --choose-seasons 加上可以选择下载哪一季\n# --resume 失败时断点续传\n\n# 下载用户的合集 （合集的页面的url，会将这个合集下载到一个文件夹）\n./bili-cli down \"https://space.bilibili.com/273715/channel/collectiondetail?sid=44375\u0026ctype=0\"\n\n```\n\n## 已知问题\n\n官方token有效期只有一个月\n\n## 如何构建\n\n### 构建1: 使用命令行方式调用ffmpeg\n\n需安装ffmpeg命令行程序。\n\n```shell\ncargo build --release\n```\n\n### 构建方式2: 将ffmpegApi静态链接到bin\n\n这种方式用户不需要额外安装ffmpeg. 但是需要在构建时链接ffmpeg依赖库。\n\n```shell\ncargo build --release --features=ffmpeg_api\n```\n\n#### 依赖库的安装\n\n##### windows\n\n- 安装 vcpkg\n- 根据 vcpkg install ffmpeg --triplet=x64-windows-static-md\n- 如果您在中国大陆的网络环境下，您可能需要设置代理之后再运行 vcpkg install 命令\n  ```PowerShell\n  $env:HTTP_PROXY = http://host:port/\n  $env:HTTPS_PROXY = http://host:port/\n  ```\n##### *nix\n\n- 使用PkgConfig\n\n根据rusty_ffmpeg官方文档需要设置FFMPEG_PKG_CONFIG_PATH变量。\n\n（linux构建成功，macos12构建失败，调试中）\n\n```shell\n# 克隆ffmpeg并检出release/4.4\ngit clone https://git.ffmpeg.org/ffmpeg.git\ncd ffmpeg\ngit checkout release/4.4\n\n# 构建ffmpeg并安装\nmkdir build\ncd build\n../configure --prefix=/Volumes/DATA/Runtimes/ffmpeg4.4\nmake -j12\nmake install\n```\n\n```shell\nexport FFMPEG_PKG_CONFIG_PATH=/Volumes/DATA/Runtimes/ffmpeg4.4/lib/pkgconfig\ncargo build --release --features=ffmpeg_api\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fbili-cli-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniuhuan%2Fbili-cli-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fbili-cli-rs/lists"}