{"id":13432172,"url":"https://github.com/hd80606b/BiliBili_Private_Msg","last_synced_at":"2025-03-16T23:30:46.333Z","repository":{"id":158060669,"uuid":"499184530","full_name":"hd80606b/BiliBili_Private_Msg","owner":"hd80606b","description":"哔哩哔哩私信导出，同时支持导出已经被撤回的/无法查看的消息","archived":false,"fork":false,"pushed_at":"2025-03-14T07:39:06.000Z","size":4954,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T08:34:24.338Z","etag":null,"topics":["api","bilibili","bilibili-message","bilibili-private-msg"],"latest_commit_sha":null,"homepage":"","language":"C#","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/hd80606b.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-02T15:11:41.000Z","updated_at":"2025-03-14T07:39:10.000Z","dependencies_parsed_at":"2024-10-27T11:47:03.043Z","dependency_job_id":"29bd1ec8-cb1b-411f-8054-7fcbd43033ac","html_url":"https://github.com/hd80606b/BiliBili_Private_Msg","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hd80606b%2FBiliBili_Private_Msg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hd80606b%2FBiliBili_Private_Msg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hd80606b%2FBiliBili_Private_Msg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hd80606b%2FBiliBili_Private_Msg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hd80606b","download_url":"https://codeload.github.com/hd80606b/BiliBili_Private_Msg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243949811,"owners_count":20373651,"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":["api","bilibili","bilibili-message","bilibili-private-msg"],"created_at":"2024-07-31T02:01:09.148Z","updated_at":"2025-03-16T23:30:46.328Z","avatar_url":"https://github.com/hd80606b.png","language":"C#","funding_links":[],"categories":["数据分析"],"sub_categories":["直播脚本"],"readme":"# BiliBili_Private_Msg\n哔哩哔哩(B站)私信导出工具，同时支持导出已经被撤回的/无法查看的消息（不包含私信存档）\n\n## 环境\n环境：.NET Framework 4.0  或 python 3.10.5\u003cbr /\u003e\n\n### 操作\n (如要导出所有联系人的私信消息，请使用python版本)\u003cbr /\u003e\n 1.针对性导出请运行exe或使用python文件夹下的BiliBili_Private_Msg.py\u003cbr /\u003e\n BiliBili_Private_Msg(ALL).py是将整个私信列表中所有人的消息一块导出到由时间命名的文件夹中\u003cbr /\u003e\n 2.通过游览器F12查看自己的Cookie，填入Cookie，如何寻找cookie，请看[通过游览器开发者工具（F12）查看自己的Cookie](./Get_cookie/README.md)\u003cbr /\u003e\n 3.选择类型，需要导出的消息是私信还是应援团\u003cbr /\u003e\n 4.填入对方的UID或MID，如下图，导出与哔哩哔哩UP主执事的聊天记录，则填235555226\u003cbr /\u003e\n![MID](https://www.z4a.net/images/2022/06/03/QQ20220603000417.png)\n 5.点击导出，当提示成功或已保存文件即可在exe/py文件所在的文件夹找到对应的TXT文件（或时间文件夹）\u003cbr /\u003e\n 6.(可选)如果要使用python版本导出应援团的消息，请将session_type的值设置为2\n### 思路/博客/注意/其他\n* 使用BiliBili_Private_Msg(ALL).py时，如果私信列表中的人数过多，请自行取消`time.sleep(2)`的注释，避免ip被ban\n* 关于该API的详情请见 [哔哩哔哩-API收集整理](https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/message/private_msg.md)\n* 思路等请见[博客](https://hd80606b.com/bilibili-message/)\u003cbr /\u003e\n* 在V1.2.0中修复了预约直播消息无法被正常导出的bug，同时对C#版本的程序进行了全面的更新\n* 在V1.1.1中添加了请求头，修正了请求被禁止的问题，~~暂时让预约直播的消息变更为了default（C#版本暂未进行更改，请优先使用python脚本）~~\n* 在V1.1.0中添加了新的参数从根本上修正了只返回前200条消息的问题\n* ~~在即将到来的V1.1.1中也会把C#版本的程序将被重构~~，添加**一键导出私信列表中所有人的消息**的功能与修正**请求被禁止**的问题\n* ~~你问我为什么要放打包文件，因为单放exe文件会报不安全~~\n* ~~远古代码，为什么还是4.0？为什么当初没有做成控制台应用？~~ 所以在这里追加了python版本\n* 本人B站UID：2239814，如您觉得提issue太麻烦，可直接B站私信我\n### 感谢\n* [@ccsugar](https://github.com/ccsugar) 为BiliBili_Private_Msg(ALL).py添加私信对象昵称提供思路和接口\n---\n#### 已知问题\n* 被撤回的消息现在疑似无法再读取了（记一笔，B站在24年1月似乎修复了）\n* 有极少数用户的消息，返回的min_seqno为1，这将导致程序进入死循环，返回的记录文件卡在重复输入最后一条私信，因此如程序运行时间过长，建议手动关闭检查聊天日志（目前原因未知，将在下个版本通过强行截断修复）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhd80606b%2FBiliBili_Private_Msg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhd80606b%2FBiliBili_Private_Msg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhd80606b%2FBiliBili_Private_Msg/lists"}