{"id":13431598,"url":"https://github.com/niuhuan/bilirust","last_synced_at":"2025-08-16T04:31:55.582Z","repository":{"id":44360601,"uuid":"438890956","full_name":"niuhuan/bilirust","owner":"niuhuan","description":"RUST 哔哩哔哩客户端","archived":false,"fork":false,"pushed_at":"2023-06-19T01:59:56.000Z","size":34,"stargazers_count":18,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T04:07:36.805Z","etag":null,"topics":["anime","bilibi","bilibili-api","bilibili-download","comic","rust"],"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":"2021-12-16T06:59:30.000Z","updated_at":"2024-07-23T18:23:33.000Z","dependencies_parsed_at":"2024-02-26T19:57:55.494Z","dependency_job_id":null,"html_url":"https://github.com/niuhuan/bilirust","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/niuhuan%2Fbilirust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbilirust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbilirust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fbilirust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niuhuan","download_url":"https://codeload.github.com/niuhuan/bilirust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230005255,"owners_count":18158371,"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":["anime","bilibi","bilibili-api","bilibili-download","comic","rust"],"created_at":"2024-07-31T02:01:04.404Z","updated_at":"2024-12-16T18:18:04.358Z","avatar_url":"https://github.com/niuhuan.png","language":"Rust","funding_links":[],"categories":["开发"],"sub_categories":["直播脚本"],"readme":"BILIRUST\n===========\nRUST哔哩哔哩客户端\n\n## 实现功能\n\n- [x] 个人中心\n    - [x] 使用WEB方式扫码获取SessionData\n    - [x] 获取个人信息\n- [x] 视频\n    - [x] 通过BVID/AVID获取视频信息\n    - [x] 获取视频的下载地址\n- [x] 用户\n  - [x] 获取用户信息\n  - [x] 获取用户的合集和系列\n  - [ ] 获取系列内的视频\n  - [x] 获取合集内的视频\n  - [x] 获取用户收藏的视频\n- [x] 客户端接口支持\n    - [x] 使用TV方式扫码获取SessionData/refresh_token\n\n## 使用方法\n\n```rust\nasync fn main() {\n    // 创建一个客户端\n    let mut client = Client::new();\n  \n    // 登录相关\n    // 扫码登录\n    let qr_data = client.login_qr().await.unwrap();\n    // 扫码后访问, (如未扫码或其他错误, 则error_data非0)\n    let info = client.login_qr_info(qr_data.oauth_key.clone()).await.unwrap();\n    // 解析扫码结果\n    let web_token = client.login_qr_info_parse_token(info.url.to_string()).unwrap();\n    // 注入token\n    client.login_set_sess_data(web_token.sess_data);  // mut\n  \n    // 接口相关\n    // 获取自己的个人信息 (需要登录)\n    client.my_info().await;\n    // 使用EP/SS获取信息 \n    client.videos_info(\"ep1234\".to_string()).await;\n    client.videos_info(\"ss1234\".to_string()).await; \n    // 获取视频的信息\n    client.bv_info(\"BV1TS4y1Q7Y9\".to_string()).await;\n    // 获取视频的下载地址 (1080P以上需要登录) (FNVAL可以使用位或一起使用) (FLV可能会被分段)\n    client.bv_download_url(\"BV1TS4y1Q7Y9\".to_string(), 459566105, FNVAL_DASH, VIDEO_QUALITY_720P).await;\n    \n    // 其他, 仅实现, 暂时没什么用\n    // TV扫码登录\n    client.tv_login_qr().await;\n    client.tv_login_qr_info(\"code\".to_string()).await;\n}\n```\n\n## PS：一些关键词的说明\n\n- （用户的）合集 ： 在接口种有时候被称作 Seasons （比如合集和系列的列表） , 有时候被称作 Collection （查询合集内的视频）。本库内的struct与fn的名称保持和官方接口一致。\n- （用户的）系列 Series\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fbilirust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniuhuan%2Fbilirust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fbilirust/lists"}