gitwtfhub

wtf is bilibili_downloader?

chenj-freedom/bilibili_downloader — explained in plain English

Analysis updated 2026-05-18

97PythonAudience · generalComplexity · 2/5LicenseSetup · moderate

TL;DR

A command-line and web-based downloader for Bilibili videos and audio, supporting single videos, multi-part episodes, and full collections.

Mindmap

mindmap
  root((repo))
    What it does
      Downloads Bilibili media
      Audio or video
    Tech stack
      Python
      yt-dlp
      FFmpeg
    Use cases
      Batch episode download
      Audio extraction
    Audience
      Bilibili viewers
      Non-technical users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Download a Bilibili video or a range of episodes from a multi-part upload

REASON 2

Save just the audio track from a Bilibili video or a full audio album

REASON 3

Batch-download an entire video collection using a local web interface, no command line needed

What's in the stack?

Pythonyt-dlpFFmpeg

How it stacks up

chenj-freedom/bilibili_downloadergianluca-improta/cinekivehelixmap/sigwood
Stars979797
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity2/53/53/5
Audiencegeneralgeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Python 3, FFmpeg on the command line, and the yt-dlp package installed first.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

This project is a downloader for Bilibili, a major Chinese video platform, that lets you save audio or video from a link either through the command line or a local web interface. It can pull a single video, a specific episode within a multi-part video, a whole video series or collection, or a single audio track or full audio album from Bilibili's audio section. For people who do not want to use a terminal, the project ships a web UI that starts by double-clicking a batch file on Windows or a command file on macOS. It opens automatically in your browser, usually at a local address on port 8765, where you can paste a Bilibili link, choose whether to grab audio or video, specify which episodes or tracks to download, and pick an output folder. Downloads appear in a list with progress and status for each item, and a failed item can be retried individually without restarting the whole batch. The command-line version takes a link and figures out on its own whether to treat it as audio or video based on the URL, though you can force one or the other. It understands three shapes of Bilibili content: a single video with one part, a multi-part video where one video ID contains several numbered parts, and a collection made up of multiple separate video IDs, some of which may themselves have multiple parts. When downloading a collection, you can pick episodes by a unified numbering scheme across the whole collection, using ranges like 1-5, comma lists like 1,2,6, or the word all. If one part in a batch fails to download, the script keeps going and downloads the remaining parts, then prints a summary of how many succeeded and failed along with a list of the failed episode numbers. The exit code reflects whether everything succeeded. The tool relies on yt-dlp to do the actual downloading and needs FFmpeg installed and available on the command line to process the audio and video files. It supports Windows and macOS and is released under the MIT license.

Yoink these prompts

Prompt 1
Help me install FFmpeg and yt-dlp so I can run this Bilibili downloader
Prompt 2
Show me the command to download episodes 1 through 5 of a multi-part Bilibili video
Prompt 3
Explain how this script tells apart a single video, a multi-part video, and a collection

Frequently asked questions

wtf is bilibili_downloader?

A command-line and web-based downloader for Bilibili videos and audio, supporting single videos, multi-part episodes, and full collections.

What language is bilibili_downloader written in?

Mainly Python. The stack also includes Python, yt-dlp, FFmpeg.

What license does bilibili_downloader use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is bilibili_downloader to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is bilibili_downloader for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.