{"id":19867258,"url":"https://github.com/fython/bili-downloader","last_synced_at":"2025-05-02T06:30:51.227Z","repository":{"id":57160588,"uuid":"308346165","full_name":"fython/bili-downloader","owner":"fython","description":"B 站视频批量下载库","archived":false,"fork":false,"pushed_at":"2020-11-08T02:47:09.000Z","size":58,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T23:13:35.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-29T14:02:08.000Z","updated_at":"2024-03-06T10:01:38.000Z","dependencies_parsed_at":"2022-08-24T12:20:10.212Z","dependency_job_id":null,"html_url":"https://github.com/fython/bili-downloader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fython%2Fbili-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fython%2Fbili-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fython%2Fbili-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fython%2Fbili-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fython","download_url":"https://codeload.github.com/fython/bili-downloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998158,"owners_count":21677932,"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":[],"created_at":"2024-11-12T15:28:53.290Z","updated_at":"2025-05-02T06:30:50.860Z","avatar_url":"https://github.com/fython.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"bili-downloader\n======\n\n自用的简陋的 B 站视频批量下载工具。\n\n注：这不是一个完整的应用程序/命令行工具，而是一个 Node.js 库，你需要了解 JavaScript/TypeScript 语言来使用它。\n\n## 安装\n\n```shell script\nnpm i @siubeng/bili-downloader\n```\n\n## 目前支持的功能\n\n- 批量获取用户所有视频任务、批量获取收藏列表所有视频任务\n- 导出视频任务、分 P 任务到 XLSX 格式\n- 根据导出的 XLSX 过滤下载任务，Chosen 栏为 0 时跳过下载\n- 选择视频清晰度、音频清晰度进行下载完整文件（Dash）\n- 调用 FFMpeg 合并 Dash 音视频，支持调整参数（使用 [node-fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg)）\n- [TO-DO 列表](https://github.com/fython/bili-downloader/projects/1)\n\n## 使用样例\n\n`bili-downloader` 的基本使用过程是：\n\n1. 调用 `BiliDownloader` 类的获取用户视频或收藏列表视频构建成一批视频任务。\n2. 调用 `operations` 包内的 map（转换）和 filter（过滤）方法构建下载流水线。\n3. 调用 `operations` 包内的 `downloadTasks` 启动下载流程。\n\n`operations` 包含的函数众多，目前仅打算自用，后续会继续完善，可能会频繁更改接口，暂不提供文档了。\n\n### 下载一个用户的所有视频\n\n```javascript\nconst {BiliDownloader, VideoQuality} = require('@siubeng/bili-downloader');\nconst {\n    mapToVideoParts,\n    mapToVideoPlayUrls,\n} = require('@siubeng/bili-downloader/dist/operations');\n\n// 使用你的 B 站登录 Cookie 来获得更高清晰度或者私密收藏列表\nBiliDownloader.init({ cookie: 'MY_COOKIE' });\nBiliDownloader.getUserVideos(375504219)\n    .then(mapToVideoParts())\n    .then(mapToVideoPlayUrls(VideoQuality.$1080p60))\n    .then(downloadTasks('D:\\\\Downloads\\\\Videos'));\n```\n\n## Licenses\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffython%2Fbili-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffython%2Fbili-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffython%2Fbili-downloader/lists"}