{"id":13431375,"url":"https://github.com/biliup/biliup-rs","last_synced_at":"2025-05-14T22:08:29.587Z","repository":{"id":37739543,"uuid":"437055168","full_name":"biliup/biliup-rs","owner":"biliup","description":"命令行投稿(B站)和视频下载工具，提供多种登录方式，支持多p。","archived":false,"fork":false,"pushed_at":"2025-04-03T09:00:38.000Z","size":1164,"stargazers_count":944,"open_issues_count":42,"forks_count":121,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-27T20:39:09.194Z","etag":null,"topics":["bilibili","bilibili-helper","upload"],"latest_commit_sha":null,"homepage":"https://biliup.github.io/biliup-rs","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/biliup.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,"zenodo":null}},"created_at":"2021-12-10T17:07:40.000Z","updated_at":"2025-04-27T15:55:21.000Z","dependencies_parsed_at":"2024-01-03T18:29:38.785Z","dependency_job_id":"3905d8c2-d8b3-47e1-b3e4-aeae8c311caa","html_url":"https://github.com/biliup/biliup-rs","commit_stats":null,"previous_names":["forgqi/biliup-rs"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biliup%2Fbiliup-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biliup%2Fbiliup-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biliup%2Fbiliup-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biliup%2Fbiliup-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biliup","download_url":"https://codeload.github.com/biliup/biliup-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235700,"owners_count":22036964,"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","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":["bilibili","bilibili-helper","upload"],"created_at":"2024-07-31T02:01:02.610Z","updated_at":"2025-05-14T22:08:24.573Z","avatar_url":"https://github.com/biliup.png","language":"Rust","funding_links":[],"categories":["UP 工具","Rust"],"sub_categories":["直播脚本"],"readme":"# biliup-rs\n\n[![Crates.io](https://img.shields.io/crates/v/biliup)](https://crates.io/crates/biliup)\n![GitHub all releases](https://img.shields.io/github/downloads/forgqi/biliup-rs/total)\n[![Telegram](https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram)](https://t.me/+IkpIABHqy6U0ZTQ5)\n[![Discord chat][discord-badge]][discord-url]\n\n[discord-badge]: https://img.shields.io/discord/1015494098481852447.svg?logo=discord\n[discord-url]: https://discord.gg/shZmdxDFB7\nB 站命令行投稿工具，支持**短信登录**、**账号密码登录**、**扫码登录**、**浏览器登录**以及**网页Cookie登录**，并将登录后返回的 cookie 和 token 保存在 `cookie.json` 中，可用于其他项目。\n\n**文档地址**：\u003chttps://biliup.github.io/biliup-rs\u003e\n\n本项目使用 Rust，可以作为 lib 被调用，理论上可以通过 [PyO3](https://github.com/PyO3/pyo3) 作为库提供给 Python 和 [napi-rs](https://github.com/napi-rs/napi-rs) 给 Node.js 等进行调用。\n\n[下载地址](https://github.com/ForgQi/biliup-rs/releases)\n\n## Aspirations\n\n### upload\n\n- [x] bilibili\n- [ ] 小红书（work-in-process）\n\n### download\n\n- [x] 斗鱼直播\n- [x] 虎牙直播\n- [x] B站直播\n- [ ] 抖音live (coming soon)\n- [ ] 快手live (coming soon)\n\n## USAGE\n\n投稿支持**直接投稿**和对现有稿件**追加投稿**：\n\n- 快速投稿，输入 `biliup upload test1.mp4 test2.mp4` 即可快速多p投稿；\n- 通过配置文件投稿，配置文件详见 [config.yaml](examples/config.yaml) ，支持按照 Unix shell style patterns 来批量匹配视频文件，如 `/media/**/*.mp4` 匹配 media 及其子目录中的所有 mp4 文件且可以自由调整视频标题、简介、标签等：\n\n```shell\n$ biliup help upload\n上传视频\n\nUsage: biliup upload [OPTIONS] [VIDEO_PATH]...\n\nArguments:\n  [VIDEO_PATH]...  需要上传的视频路径,若指定配置文件投稿不需要此参数\n\nOptions:\n      --submit \u003cSUBMIT\u003e              提交接口 [default: client] [possible values: client, app, web]\n  -c, --config \u003cFILE\u003e                Sets a custom config file\n  -l, --line \u003cLINE\u003e                  选择上传线路 [possible values: bda2, ws, qn, bldsa, tx, txa, bda, alia]\n      --limit \u003cLIMIT\u003e                单视频文件最大并发数 [default: 3]\n      --copyright \u003cCOPYRIGHT\u003e        是否转载, 1-自制 2-转载 [default: 1]\n      --source \u003cSOURCE\u003e              转载来源 [default: ]\n      --tid \u003cTID\u003e                    投稿分区 [default: 171]\n      --cover \u003cCOVER\u003e                视频封面 [default: ]\n      --title \u003cTITLE\u003e                视频标题 [default: ]\n      --desc \u003cDESC\u003e                  视频简介 [default: ]\n      --dynamic \u003cDYNAMIC\u003e            空间动态 [default: ]\n      --tag \u003cTAG\u003e                    视频标签，逗号分隔多个tag [default: ]\n      --dtime \u003cDTIME\u003e                延时发布时间，距离提交大于4小时，格式为10位时间戳\n      --interactive \u003cINTERACTIVE\u003e    [default: 0]\n      --mission-id \u003cMISSION_ID\u003e\n      --dolby \u003cDOLBY\u003e                是否开启杜比音效, 0-关闭 1-开启 [default: 0]\n      --hires \u003cLOSSLESS_MUSIC\u003e       是否开启 Hi-Res, 0-关闭 1-开启 [default: 0]\n      --no-reprint \u003cNO_REPRINT\u003e      0-允许转载，1-禁止转载 [default: 0]\n      --open-elec \u003cOPEN_ELEC\u003e        是否开启充电, 0-关闭 1-开启 [default: 0]\n      --up-selection-reply           是否开启精选评论，仅提交接口为app时可用\n      --up-close-reply               是否关闭评论，仅提交接口为app时可用\n      --up-close-danmu               是否关闭弹幕，仅提交接口为app时可用\n      --extra-fields \u003cEXTRA_FIELDS\u003e  自定义提交参数\n  -h, --help                         Print help\n```\n\n- 下载视频：`./biliup download https://xxxx`\n- 查看转码失败具体分p：`./biliup show BVxxxxx`\n- 查看完整用法命令行输入 `biliup -h`\n\n```shell\n$ biliup help\nUpload video to bilibili.\n\nUsage: biliup [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  login     登录B站并保存登录信息\n  renew     手动验证并刷新登录信息\n  upload    上传视频\n  append    是否要对某稿件追加视频\n  show      打印视频详情\n  dump-flv  输出flv元数据\n  download  下载视频\n  list      列出所有已上传的视频\n  help      Print this message or the help of the given subcommand(s)\n\nOptions:\n  -p, --proxy \u003cPROXY\u003e              配置代理\n  -u, --user-cookie \u003cUSER_COOKIE\u003e  登录信息文件 [default: cookies.json]\n      --rust-log \u003cRUST_LOG\u003e        [default: tower_http=debug,info]\n  -h, --help                       Print help\n  -V, --version                    Print version\n```\n\n### 多账号支持\n\n请在子命令**之前**通过 `-u` 或者 `--user-cookie` 参数传入 cookie 文件的路径（默认为当前目录下的 \"cookies.json\"）。例如：\n\n```shell\n$biliup -u user1.json login\n$biliup --user-cookie user2.json upload ...\n$biliup renew  # ./cookies.json\n```\n\n### 代理支持\n\n请在子命令**之前**通过 `-p` 或者 `--proxy` 参数传入 代理 的地址。例如：\n```powershell\nbiliup -p http://username:password@proxy.example.com:8080 upload\n```\n\n### Windows 演示\n\n登录：\n\n```powershell\nbiliup login\n```\n\n![login](.github/resource/login.gif)\n\n上传：\n\n```powershell\nbiliup upload\n```\n\n![upload](.github/resource/upload.gif)\n\n## SEE ALSO\n\n- 自动录播投稿[工具](https://github.com/ForgQi/biliup)\n- 基于此项目的[GUI版](https://github.com/ForgQi/Caution)\n\n___\n\nbilibili 投稿模式分主要为 fetch 和直传两种，线路概览：\n\n测速：\u003chttp://member.bilibili.com/preupload?r=ping\u003e\n\n- bup（直传b站投稿系统）\n  - upos\n    - [x] bda2（百度云）\n    - [x] qn（七牛）\n    - [x] alia（阿里云海外）\n    - [x] bldsa (B站自建)\n    - [x] tx (腾讯云EO)\n    - [x] txa (腾讯云EO海外)\n    - [x] bda (百度云海外)\n- bupfetch （传至合作方后由b站投稿系统拉取，**已经长时间不可用**）\n  - [x] ~~kodo（七牛）~~\n  - [ ] ~~bos（百度）~~\n  - [ ] ~~gcs（谷歌）~~\n  - [x] ~~cos（腾讯）~~\n\n \u003e 未选择上传线路时，在上传前会通过 probe 来返回几条线路，并发包测试从中选择响应时间较短的，正常情况下都会选择到良好的上传线路。\n \u003e 如果自动选择的线路上传速度不佳，可以增大并发数或指定上述已支持选择的线路。\n \u003e 理论上，增加并发数能加快上传速度，但部分线路存在并发数限制，请结合实际自行测试。\n\n## TIPS\n\n用户等级大于 3 ，且粉丝数 \u003e 1000 ，Web 端投稿不限制分 P 数量。B 站 Web 端将替换为[合集](https://www.bilibili.com/read/cv14762048) 。\n\n对于不满足条件的账号，多 P 投稿只能依靠 B 站的投稿客户端，但是投稿客户端使用的线路与 Web 端不同，质量低于 Web 端的线路，在国外机器会放大这一差距。所以本项目使用 client 的提交接口配合 Web 端的上传线路，弥补两者各自的不足。既可以多 P 上传，又提供了质量（速度和稳定性）较高的线路，且提供了 Web 端不具备的手动切换线路功能。\n\n## For Developers\n\n```shell\nexport DATABASE_URL=\"sqlite:data.db\"\ncargo sqlx db create\ncargo sqlx migrate run --source .\\crates\\biliup-cli\\migrations\\\ncargo sqlx prepare  --merged\ncargo run -- server -b localhost\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiliup%2Fbiliup-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiliup%2Fbiliup-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiliup%2Fbiliup-rs/lists"}