{"id":34764938,"url":"https://github.com/wshihan/blblcd","last_synced_at":"2025-12-25T07:06:31.178Z","repository":{"id":242494467,"uuid":"809695778","full_name":"WShihan/blblcd","owner":"WShihan","description":"用于下载哔哩哔哩/Bilibili（B站） 视频评论的命令行工具。","archived":false,"fork":false,"pushed_at":"2025-10-05T15:26:32.000Z","size":6231,"stargazers_count":80,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T17:37:56.114Z","etag":null,"topics":["bilibili","comment","download","spider"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WShihan.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-03T09:17:21.000Z","updated_at":"2025-10-05T15:26:35.000Z","dependencies_parsed_at":"2024-08-27T13:24:19.081Z","dependency_job_id":"d0e65d15-8025-47bb-bb1a-f62b525d0028","html_url":"https://github.com/WShihan/blblcd","commit_stats":null,"previous_names":["wshihan/blblcd"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/WShihan/blblcd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WShihan%2Fblblcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WShihan%2Fblblcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WShihan%2Fblblcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WShihan%2Fblblcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WShihan","download_url":"https://codeload.github.com/WShihan/blblcd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WShihan%2Fblblcd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28022940,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","comment","download","spider"],"created_at":"2025-12-25T07:06:23.009Z","updated_at":"2025-12-25T07:06:31.172Z","avatar_url":"https://github.com/WShihan.png","language":"Go","readme":"![GitHub Repo stars](https://img.shields.io/github/stars/WShihan/blblcd?style=plastic) ![GitHub repo size](https://img.shields.io/github/repo-size/WShihan/blblcd?style=plastic) ![GitHub last commit](https://img.shields.io/github/last-commit/WShihan/blblcd?style=plastic) ![GitHub](https://img.shields.io/github/license/WShihan/blblcd?style=plastic)  ![GitHub top language](https://img.shields.io/github/languages/top/WShihan/blblcd?style=plastic) \n\n---\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./example/blblcd.png\" alt=\"blblcd\" style=\"width:3em;margin: 0px auto\" /\u003e\u003c/p\u003e\n\nblblcd（Bilibili Comment Dowloader），一款基于 [bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 的B站视频评论下载工具。\n\n🗂️仓库：[Codeberg](https://codeberg.org/wsh233/blblcd) | [GitHub](https://github.com/WShihan/blblcd) \n\n特点：\n\n* 使用方便，仅包含一个可执行文件，无需安装其他依赖。\n* 下载单/多个视频评论，可按热评/时间顺序。\n* 下载指定UP主视频的评论，可按投稿时间/收藏/播放顺序。\n* 下载子评论，可下载隐藏评论和“楼中楼”评论。\n* 下载评论中的图片，可将图片下载到本地同时将链接写入csv。\n* 地图统计，支持评论统计输出为地图展示。\n* 跨平台，支持Mac，Linux， Windows。\n\n\n\n🔔 请留意\n\n* 这是一个命令行程序，没有图形化界面。\n* 若爬取结果数量不对只有十几条评论和网页上看到的数量不一致，那么很大概率是cookie失效导致。\n* 爬取结果的csv文件编码为utf-8，使用诸如Microsoft Office之类的办公软件打开会显示乱码，建议用记事本或者代码编辑器打开。\n* 目前以维护已有功能为主，该工具基本符合本人需求，暂不接受新增功能开发请求。当然如果你发现已有功能出现bug，欢迎提交issue，我将尽力去解决。\n\n\n\n爬取评论信息如下：\n\n```text\n\tUname         名称\n\tSex           性别\n\tContent       评论内容\n\tRpid          评论id\n\tOid           评论区id\n\tBvid          视频bv\n\tMid           发送者id\n\tParent        父级评论\n\tFansgrade     是否粉丝标签\n\tCtime         评论时间戳\n\tLike          喜欢数\n\tFollowing     是否关注\n\tCurrent_level 当前等级\n\tLocation      位置\n```\n\n效果\n===\n\n![mapping](./example/mapping.png)\n\n\n\n![image-20240816044237687](https://md-1301600412.cos.ap-nanjing.myqcloud.com/pic/typora/image-20240816044237687.png)\n\n\n使用\n====\n\n## 需要准备\n\n* cookie ：必须\n* mid ：up编号，当查找up视频时必须\n* bvid：稿件视频编号，单独下载单个/多个视频评论时必须\n\n然后到[release](./releasets)页面下载操作系统对应的二进制执行文件。\n\n\n\n#### 获取Cookie\n\n登录[哔哩哔哩 ](https://www.bilibili.com/)，按住`F12`进入开发者工具页面，选择`网络`，点击其中任意一条请求，（最好是XHR或Fetch类型的请求）查看请求头，将Cookie值复制后，在本地保存为text文件（最好是与blblcd放置于同一个目录下，命名为cookie.text，程序会自动读取）。\n\n![cookie](./example/cookie.png)\n\n\n\n#### 获取up主mid\n\n进入up主页，浏览器地址栏上将会显示mid，复制它，例如下面链接里的mid为`112233445`。\n\n![mid](./example/mid.png)\n\n#### 获取视频bvid\n\n进入视频页面，查看浏览器地址栏，URL第二段就是bvid，例如`BV1Cm421T7Zg`\n\n![image-20240607212158235](https://md-1301600412.cos.ap-nanjing.myqcloud.com/pic/typora/image-20240607212158235.png)\n\n\n\n\n\n## 使用命令\n\n在终端输入`-h`查看所有命令，参数及其简写。\n\n```bash\n./blblcd -h\n```\n\n### 示例\n\n#### 单个/多个视频\n\n基础\n\n```bash\nblblcd video BV1VJ4m1jk34K\n```\n\n多个视频\n\n```bash\nblblcd video BV1VJ4m1jk34K  BV1sdfVJ4m1jksdf\n```\n\n开启下载评论中的图片\n\n```bash\nblblcd video BV1VJ4m1jk34K --img-download\n```\n\n指定评论按`回复`顺序\n\n```bash\nblblcd video BV1VJ4m1jk34K --corder 2\n```\n\n指定`cookie`文件位置\n\n```bash\nblblcd video BV1VJ4m1jk34K --cookie /path/to/cookiefile.text  --corder 2\n```\n\n输出位置\n\n```bash\nblblcd video BV1VJ4m1jk34K --corder 2 --output path/to/output\n```\n\n\n\n#### up视频列表\n\n基础（默认获取前三页，一页30条视频）\n\n```bash\nblblcd up 123344555\n```\n\n指定`cookie`\n\n```bash\nblblcd up 123344555 --cookie /path/to/cookiefile.text\n```\n\n视频列表顺序，按`最多收藏`\n\n```bash\nblblcd up 123344555 --skip 3 --pages 5 --vorder stow\n```\n\n固定页数\n\n```bash\nblblcd up 123344555 --pages 5\n```\n\n忽略页数，跳过前三页后获取5页，即4-8页\n\n```bash\nblblcd up 123344555 --skip 3 --pages 5\n```\n\n输出位置\n\n```bash\nblblcd up 123344555  --output output/path\n```\n\n并发数量\n\n```bash\nblblcd up 123344555  --workers 10\n```\n\n\n\n#### 输出地图统计\n\n```bash\nblblcd video BV1VJ4m1jk34K --mapping \n```\n\n\n\n\n\n[![start_history](https://api.star-history.com/svg?repos=WShihan/blblcd\u0026type=Date)](https://star-history.com/#WShihan/blblcd\u0026Date)\n\n\n\n\n声明\n====\n\n* 源代码仅供交流学习使用，切勿用于违法犯罪。\n* 使用该工具请遵守`Bilibili`相关规定。\n* blblcd不会保存或泄露`Cookie`，请放心食用。\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihan%2Fblblcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwshihan%2Fblblcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwshihan%2Fblblcd/lists"}