{"id":13498896,"url":"https://github.com/Hsury/BiliDrive","last_synced_at":"2025-03-29T03:32:10.991Z","repository":{"id":47295497,"uuid":"217058134","full_name":"Hsury/BiliDrive","owner":"Hsury","description":"☁️ 哔哩云，不支持任意文件的全速上传与下载","archived":false,"fork":false,"pushed_at":"2020-03-20T14:01:48.000Z","size":104,"stargazers_count":1455,"open_issues_count":4,"forks_count":178,"subscribers_count":24,"default_branch":"bilibili","last_synced_at":"2024-10-31T17:38:44.075Z","etag":null,"topics":["bilibili","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hsury.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}},"created_at":"2019-10-23T13:00:00.000Z","updated_at":"2024-10-24T07:51:51.000Z","dependencies_parsed_at":"2022-08-12T13:20:49.901Z","dependency_job_id":null,"html_url":"https://github.com/Hsury/BiliDrive","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hsury%2FBiliDrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hsury%2FBiliDrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hsury%2FBiliDrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hsury%2FBiliDrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hsury","download_url":"https://codeload.github.com/Hsury/BiliDrive/tar.gz/refs/heads/bilibili","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135700,"owners_count":20729056,"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","python"],"created_at":"2024-07-31T22:00:20.818Z","updated_at":"2025-03-29T03:32:10.731Z","avatar_url":"https://github.com/Hsury.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://cdn.kagamiz.com/BiliDrive/bilidrive.png\" width=\"128\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e- BiliDrive -\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e☁️ 哔哩哔哩云，支持任意文件的全速上传与下载 ☁️\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/version-2019.12.22-green.svg?longCache=true\u0026style=for-the-badge\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/license-SATA-blue.svg?longCache=true\u0026style=for-the-badge\"\u003e\n\u003cimg src=\"https://img.shields.io/travis/com/Hsury/BiliDrive?style=for-the-badge\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://cdn.kagamiz.com/BiliDrive/demo.png\" width=\"750\"\u003e\n\u003c/p\u003e\n\n## 特色\n\n- 轻量：无复杂依赖，资源占用少\n- 自由：无文件格式与大小限制，无容量限制\n- 安全：上传的文件需要通过生成的META URL才能访问，他人无法随意查看\n- 稳定：带有分块校验与超时重试机制，在较差的网络环境中依然能确保文件的完整性\n- 快速：支持多线程传输与断点续传，同时借助B站的CDN资源，能最大化地利用网络环境进行上传与下载\n\n## 使用指南\n\n### 准备\n\n前往[发布页](https://github.com/Hsury/BiliDrive/releases/latest)获取可直接运行的二进制文件\n\n或使用Python软件包管理器pip从[PyPI仓库](https://pypi.org/project/BiliDrive/)安装\n\n亦可下载[源代码](https://github.com/Hsury/BiliDrive/archive/master.zip)后使用Python 3.6或更高版本运行\n\n### 登录\n\n```\npython -m BiliDrive login [-h] username password\n\nusername: Bilibili用户名\npassword: Bilibili密码\n```\n\n### 上传\n\n```\npython -m BiliDrive upload [-h] [-b BLOCK_SIZE] [-t THREAD] file\n\nfile: 待上传的文件路径\n\n-b BLOCK_SIZE: 分块大小(MB), 默认值为4\n-t THREAD: 上传线程数, 默认值为4\n```\n\n上传完毕后，终端会打印一串META URL（通常以`bdrive://`开头）用于下载或分享，请妥善保管\n\n### 下载\n\n```\npython -m BiliDrive download [-h] [-f] [-t THREAD] meta [file]\n\nmeta: META URL(通常以bdrive://开头)\nfile: 另存为新的文件名, 不指定则保存为上传时的文件名\n\n-f: 覆盖已有文件\n-t THREAD: 下载线程数, 默认值为8\n```\n\n下载完毕后会自动进行文件完整性校验，对于大文件该过程可能需要较长时间，若不愿等待可直接退出\n\n### 查看文件元数据\n\n```\npython -m BiliDrive info [-h] meta\n\nmeta: META URL(通常以bdrive://开头)\n```\n\n### 查看历史记录\n\n```\npython -m BiliDrive history [-h]\n```\n\n### 交互模式\n\n不传入任何命令行参数，直接运行程序即可进入交互模式\n\n该模式下，程序会打印命令提示符`BiliDrive \u003e `，并等待用户输入命令\n\n## 技术实现\n\n将任意文件分块编码为图片后上传至B站，对该操作逆序即可下载并还原文件\n\n## 性能指标\n\n### 测试文件\n\n文件名：[Vmoe]Hatsune Miku「Magical Mirai 2017」[BDrip][1920x1080p][HEVC_YUV420p10_60fps_2FLAC_5.1ch\u00262.0ch_Chapter][Effect Subtitles].mkv\n\n大小：14.5 GB (14918.37 MB)\n\n分块：10 MB * 1492\n\nMETA URL：bdrive://d28784bff1086450a6c331fb322accccd382228e\n\n### 上传\n\n地理位置：四川成都\n\n运营商：教育网\n\n上行速率：20 Mbps\n\n用时：02:16:39\n\n平均速度：1.82 MB/s\n\n### 下载\n\n### 测试点1\n\n地理位置：福建福州\n\n运营商：中国电信\n\n下行速率：100 Mbps\n\n用时：00:18:15\n\n平均速度：13.62 MB/s\n\n### 测试点2\n\n地理位置：上海\n\n运营商：中国电信\n\n下行速率：1 Gbps\n\n用时：00:02:22\n\n平均速度：104.97 MB/s\n\n## 免责声明\n\n请自行对重要文件做好本地备份\n\n请勿使用本项目上传不符合社会主义核心价值观的文件\n\n请合理使用本项目，避免对哔哩哔哩的存储与带宽资源造成无意义的浪费\n\n该项目仅用于学习和技术交流，开发者不承担任何由使用者的行为带来的法律责任\n\n## 许可证\n\nBiliDrive is under The Star And Thank Author License (SATA)\n\n本项目基于MIT协议发布，并增加了SATA协议\n\n您有义务为此开源项目点赞，并考虑额外给予作者适当的奖励 ∠( ᐛ 」∠)＿\n","funding_links":[],"categories":["Python","CDN","Python (1887)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHsury%2FBiliDrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHsury%2FBiliDrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHsury%2FBiliDrive/lists"}