{"id":13430472,"url":"https://github.com/lifegpc/bili","last_synced_at":"2026-01-16T11:36:46.091Z","repository":{"id":39893627,"uuid":"217462770","full_name":"lifegpc/bili","owner":"lifegpc","description":"A tool to download barrage/video from bilibili/acfun. Support English, Japanese and Chinese(China).一个Python编写的从Bilibili/Acfun下载弹幕/视频的工具。支持英语、日语和中文（中国）。（WEBGUI正在路上）","archived":false,"fork":false,"pushed_at":"2024-07-11T12:49:19.000Z","size":2002,"stargazers_count":359,"open_issues_count":14,"forks_count":34,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-16T05:31:51.986Z","etag":null,"topics":["acfun","barrage","bilibili","danmu","downloader","python","subtitles","video-downloader"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lifegpc.png","metadata":{"files":{"readme":"README.en.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":"2019-10-25T06:07:24.000Z","updated_at":"2025-03-06T06:56:11.000Z","dependencies_parsed_at":"2025-03-16T06:45:11.747Z","dependency_job_id":null,"html_url":"https://github.com/lifegpc/bili","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/lifegpc/bili","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifegpc%2Fbili","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifegpc%2Fbili/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifegpc%2Fbili/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifegpc%2Fbili/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lifegpc","download_url":"https://codeload.github.com/lifegpc/bili/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifegpc%2Fbili/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["acfun","barrage","bilibili","danmu","downloader","python","subtitles","video-downloader"],"created_at":"2024-07-31T02:00:54.246Z","updated_at":"2026-01-16T11:36:46.074Z","avatar_url":"https://github.com/lifegpc.png","language":"Python","funding_links":[],"categories":["下载工具"],"sub_categories":["直播脚本"],"readme":"[中文(中国)](README.md) [日本語](README.ja.md)\n# BiliBili Barrage/Video Downloader\n- [BiliBili Barrage/Video Downloader](#bilibili-barragevideo-downloader)\n    * [Introduction](#introduction)\n    * [Program Features](#program-features)\n    * [Dependent Libraries](#dependent-libraries)\n        + [JavaScript Dependent Libraries](#javascript-dependent-libraries)\n    * [Configuration Files](#configuration-files)\n        + [cookies.json](#cookiesjson)\n        + [settings.json](#settingsjson)\n        + [webui.json](#webuijson)\n        + [sections.json](#sectionsjson)\n        + [tv.bilibili.player.xml](#tvbilibiliplayerxml)\n## Introduction\nThis program is written in Python (Python3), use some Python libraries and ChromeDriver. (When using ChromeDriver, it is more convenient to log in or pass captcha. The program's main features will not be affected if without ChromeDriver.)  \nThe program now supports the command line.  \nIf you want to build your own Release, you can find build script on [bili.build.bat](https://github.com/lifegpc/bili.build.bat).  \nAll Release are signatured with [GPG](https://gnupg.org/).  \n\u003cdetails\u003e\n\u003csummary\u003ePublic Key\u003c/summary\u003e\n\u003cp\u003e\n\n```\n-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBGAs3FkBEADdmvdU9RwUX5yY2jzkoHl7pKGIDpZOQB/CDvz8lpQaVLp+QilR\ngEEaWIWrUsKhTi2OTcSwO+sXET6lYRAruzs0LrXuXMHU/gJeonn6+Fx4blgRXKIc\nJqTRSTLmTBwLzl27mgOMe6vK5H4aQlr/Bi7XvGCe70H4nokSs7/eGtuN8GZ9h90r\n25fORdp8loc0K40pfZ8vJZaQ6k3y+W97dv5bJVGlkR71NQC957+1dDquI/zKFKYh\nb3aXeIPWtjK2WZoYOg8oax0p/NTRQ6SpnODZDrv2/x0wUx4PzyRMsFifSDRApZBv\njnOFY8uhIGScBodj32gDGebmcnjrrkgahnVZ2wUbb8sYqojAJkhzVIQCQDnYq+tI\ng5uE5rUAMcYsHkg7JSZp8/5suBwMXJpeiUcP7TSQ2nU6hIDsElCFyDivtAdMwEym\nK3rgqdTWJgTkLsVHkG05XQT798zbusZ18Q1KkLRDWeWs285d1tIf1EM9irRp+3KW\nQVPX6SX/zdFM0KLRSZRF46iW3POw+O97C3ANUpmpTBxl0TNPC7/iiEm2ZvDYWLvj\nQqRhI9aPg3LHyz2Ifm3b/4mzlIW6wlQ83vVjfajrs/lsjOysnHRloNd6jS+H+xiE\nLleHHDAKkGherrkh/h4Syws9b0BYrR6mkz6z6JwMc6NbuVInaxtGfsXwfQARAQAB\ntB9saWZlZ3BjIDxnMTcxMDQzMTM5NUBnbWFpbC5jb20+iQJOBBMBCAA4FiEEDpRO\nqkZl3Qn8LwIsI/Sv1spVIhoFAmAs3FkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgEC\nF4AACgkQI/Sv1spVIh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kcRuD707BkN4SKsk0d7rLO\nzRlD7colcKT/F5NAG5kohc2QGuK8KHyRMfeg80YsddbKr1XSOo3QxS2Ecg==\n=DTeS\n-----END PGP PUBLIC KEY BLOCK-----\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## Program Features\n- [x] [Download with aria2c](#download-with-aria2c)\n- [x] [Merge Separated Videos Automatically](#merge-separated-videos-automatically)\n- [x] [mp4/mkv Format](#mp4mkv-format)\n- [x] [m4a Format](#m4a-format)\n- [x] [flac Format](#flac-format)\n- [ ] [mp3 Format](#mp3-format)\n- [x] [Normal AV/BV Number Video](#normal-avbv-number-video)\n    * [x] Download Barrage\n    * [x] Download All Barrage form Historical Records\n    * [x] Download Video\n    * [x] [Only Download Audio](#only-download-audio)\n    * [x] Only Download Cover\n    * [x] Only Download Subtitles\n    * [x] 4K and HDR\n    * [x] Parse Interactive Video\n- [x] [Bangumi Video](#bangumi-video)\n    * [x] Download Barrage\n    * [x] Download All Barrage form Historical Records\n    * [x] Download Video\n    * [x] [Only Download Audio](#only-download-audio-1)\n    * [x] [Only Download Cover](#only-download-cover)\n    * [x] 4K\n    * [ ] HDR (May support, the author can't find test video)\n- [x] [Purchased Courses](#purchased-courses)\n\t* Almost same as [Bangumi Video](#bangumi-video).\n\t* [x] [Only Download Cover](#only-download-cover-1)\n- [x] [Purchased Courses List](#purchased-courses-list)\n- [x] [Favorites](#favorites)\n\t* [x] [Supported GET Parameters](#supported-get-parameters)\n- [x] [Channel List](#channel-list)\n- [x] [Channel](#channel)\n    * [x] [Supported GET Parameters](#supported-get-parameters-1)\n- [x] [Uploaded Video List](#uploaded-video-list)\n    * [x] [Supported GET Parameters](#supported-get-parameters-2)\n- [x] [Live Record](#live-record)\n    * [x] [Download Video](#download-video)\n    * [x] [Download Barrage](#download-barrage)\n- [x] [Live](#live)\n    * [x] [Download Video](#download-video-1)\n- [x] [AU Number Audio](#au-number-audio)\n    * [x] [Download Audio](#download-audio)\n    * [x] [Only Download Lyrics](#only-download-lyrics)\n    * [x] Only Download Cover\n- [x] [Songs List](#songs-list)\n### Download with aria2c\nThe program now supports downloading with aria2c. Download with aria2c is recommended, because aria2c provide faster download speed.  \nIf you want to enable this feature, make sure the program can call aria2c by using command line (You can simply put aria2c in program directory.). Also make sure enable this feature in the settings.\n### Merge Separated Videos Automatically\nThis feature needs ffmpeg.  \nIf you want to enable this feature, make sure the program can call ffmpeg by using command line (You can simply put ffmpeg in program directory.). Also make sure you have not **disabled** this feature in the settings.\n### mp4/mkv Format\nYou can select the video format you want in the settings.\n### m4a Format\nThe program supports downloading audio as m4a files.\n### flac Format\nSome audios may have lossless quality, the program can save these formats as flac files.\n### mp3 Format\nmp3 is not supported now. (Because the author don't want to transcode the audio file.)\n### Normal AV/BV Number Video\nThis program supports following input format (Take av9 for example. The program ignores case.):\n- ```9```\n- ```av9```\n- ```BV1xx411c7mC```\n- ```bilibili.com/video/av9``` (The former ```https://```, ```www.``` will be ignored.)\n- ```bilibili.com/video/BV1xx411c7mC```\n- ```b23.tv/av9```\n- ```b23.tv/BV1xx411c7mC```\n- ```bilibili.com/s/video/av9```\n- ```bilibili.com/s/video/BV1xx411c7mC```\n- ```bilibili.com/festival/2021bnj?bvid=BV1j5411n7s9```\n\nIf the video is an episode of Bangumi, the program will redirect it to [Bangumi video](#bangumi-video). \n#### Only Download Audio\nOnly supports DASH stream video. (Most videos are DASH streams now.)\n### Bangumi Video\nThis program supports following input format (Take SS26291 for example. The program ignores case.):\n- ```ss26291```\n- ```ep259653```\n- ```md4316442```\n- ```bilibili.com/bangumi/play/ss26291```\n- ```bilibili.com/bangumi/play/ep259653```\n- ```bilibili.com/bangumi/media/md4316442```\n- ```b23.tv/ss26291```\n- ```b23.tv/ep259653```\n- ```40240711``` and so on (Input as [Normal AV/BV Number Video](#normal-avbv-number-video).)\n\nIf the program can't find this season, it will be redirected to [Purchased Courses](#purchased-courses).\n#### Only Download Audio\nOnly supports DASH stream video.\n#### Only Download Cover\nWhen downloading an episode's cover of a season, the season's cover will also be downloaded.\n### Purchased Courses\nThis program supports following input format (Take SS150 for example. The program ignores case.):\n- ```bilibili.com/cheese/play/ss150```\n- ```bilibili.com/cheese/play/ep2425```\n#### Only Download Cover\nThis feature can't download current episode's cover. But it can download courses' cover and description image.\n### Purchased Courses List\nThis program supports following input format:\n- ```bilibili.com/cheese/mine/list```\n- ```bilibili.com/v/cheese/mine/list```\n\nThis feature can get a list of all purchased courses and let you select courses you want to download.\n### Favorites\nThis program supports following input format (Take UID1 for example.):\n- ```space.bilibili.com/1/favlist```\n\nThis feature can get a list of videos from Favorites and let you select videos you want to download.\n#### Supported GET Parameters\n- ```fid```: to specify which Favorites you want to parse\n- ```keyword```: the keyword if you want to search in Favorites\n- ```type```: to specify the search range. 0 is current Favorites, 1 is all Favorites.\n- ```tid```: to specify the video type, 0 is all types. You can use ```--ltid```(command line parameter) to get all available tid for current Favorites.\n- ```order```: to specify video's order. ```mtime``` is added time, ```view``` is views, ```pubtime``` is publish time.\n### Channel List\nThis program supports following input format (Take UID1 for example.):\n- ```space.bilibili.com/1/channel/index```\n\nThis feature can get a list of channels and let you select the channel you want to download.\n### Channel\nThis program supports following input format (Take UID928123 for example.):\n- ```space.bilibili.com/928123/channel/detail?cid=42271```\n#### Supported GET Parameters\n- ```cid```: to specify the channel (Must have this parameter).\n- ```order```: to specify the order of videos. 0 is default order, 1 is reverse order.\n\nThis feature can get a list of videos from the channel and let you select videos you want to download.\n### Uploaded Video List\nThis program supports following input format (Take UID1 for example.):\n- ```space.bilibili.com/1/video```\n- ```bilibili.com/medialist/play/225910184```\n#### Supported GET Parameters\n- ```tid```: to specify the video type, 0 is all types. You can use ```--ltid```(command line parameter) to get all available tid for current uploaded video list.\n- ```keyword```: the keyword if you want to search in uploaded video list\n- ```order```: to specify video's order. ```pubdate``` is publish time, ```click``` is views, ```stow``` is favorited times.\n\nThis feature can get a list of videos from a uploader's uploaded video list and let you select videos you want to download.\n### Live Record\nThis program supports following input format (Take R1mx411c7En for example.):\n- ```live.bilibili.com/record/R1mx411c7En```\n#### Download Video\nThis feature now only support the default video format (origin quality). If a live record have other video formats, you can see the warning in downloader. If you see that warning, please submit an [issue](https://github.com/lifegpc/bili/issues).\n#### Download Barrage\nThis feature now only support normal barrage. The barrage file will be converted from the original format to XML format.\n### Live\nThis program supports following input format (Take ROOMID1 for example.):\n- ```live.bilibili.com/1```\n#### Download Video\nThis feature supports selecting the video quality. You can also select the URL by using command line.\n### AU Number Audio\nThis program supports following input format (Take AU1 for example.):\n- ```au1```\n- ```bilibili.com/audio/au1```\n- ```b23.tv/au1```\n#### Download Audio\nNow support multiply audio quality.  \nIf the audio has the related video, the program will try to get more audio formats from the related video.\n#### Only Download Lyrics\nThe program will standardize lyrics by default. After standardizing, the lyrics can be adapted to more audio players.  \nIf the audio has the related video, the program will try to get more lyrics(subtitles) from the related video.\n### Songs List\nThis program supports following input format (Take AM29931432 for example.):\n- ```am29931432```\n- ```bilibili.com/audio/am29931432```\n- ```bilibili.com/audio/mycollection/29981833```\n## Dependent Libraries\n[requests](https://pypi.org/project/requests/)   \n[selenium](https://pypi.org/project/selenium/)  \n[rsa](https://pypi.org/project/rsa/)  \n[polib](https://pypi.org/project/polib/)  \n[web.py](https://webpy.org/)  \n[regex](https://pypi.org/project/regex/)  \n[iso-639](https://pypi.org/project/iso-639/)  \n[qrcode](https://github.com/lincolnloop/python-qrcode)  \n[Js2Py](https://github.com/PiotrDabkowski/Js2Py)  \nThe login part refers to the login part of [Bilibili-Toolkit](https://github.com/Hsury/Bilibili-Toolkit).\n### JavaScript Dependent Libraries\n[jQuery](https://jquery.com/)  \n[js-sha256](https://github.com/emn178/js-sha256)  \n[jsbn](http://www-cs-students.stanford.edu/~tjw/jsbn/) (PS. It has been merged into [```webuihtml/js(origin)/rsa.js```](webuihtml/js(origin)/rsa.js).)  \n[js-base64](https://github.com/dankogai/js-base64)  \n[QRCode.js](https://github.com/davidshimjs/qrcodejs)  \n[Viewer.js](https://github.com/fengyuanchen/viewerjs)  \n[clipboard.js](https://github.com/zenorocha/clipboard.js)  \n[FileSaver.js](https://github.com/eligrey/FileSaver.js)\n## Configuration Files\n### cookies.json\nThis file including the cookies information, which is used by the program to keep logging in.\n\n### settings.json\nThis file including some settings. You can run ```setsettings.py``` to configure.\n\n### webui.json\nThis file including the settings for WEB User Interface.\n\n### sections.json\nThis file including the section information for WEB User Interface if you enable password verification.\n\n### tv.bilibili.player.xml\nThis file including the filter rules for barrages.  \nYou can export this file from bilibili WEB player.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifegpc%2Fbili","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifegpc%2Fbili","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifegpc%2Fbili/lists"}