Download videos (and popup comments) from

Just found a nice website that analyzes the video path and so we could download the videos that are on! As of today when I post this, the webpage is still alive.

06/05/2017: Something to note. Member-only videos (non public videos) cannot be downloaded right now. Keyword test: 다운로드, 下载, 下載, ダウンロード, descargar, скачать, ดาวน์โหลด

The Ultimate Solution (PC-based)

Hi all, I have been looking for a reliable solution for so long. I've been searching since 2015, and it never really gives a reliable solution. After struggling for a while, here I give you the ultimate solution to run on your PC. Using it as a web service is possible, but it'll be too costly to maintain. Given my financial condition I cannot afford that.

Anyway, the essential steps are simple. As some people are confused about the procedure, let me make this clearer. Don't give up on trying! (08/12/2017)

  • Install Python 3 and reboot your computer
    • Download from
    • For MacOS/Linux users, just reboot
    • For Windows users, remember to check "Add python.exe to Path" before you install, something like shown below
  • If you use Linux or Mac OS, open up a terminal
    • Run the following command:
      sudo pip3 install you-get
    • If pip3 does not exist, try replacing that with just pip
  • If you use Windows, open up the command window as Administrator
    • Run the following command:
      python.exe -m pip install you-get
    • Example from Hiki
    • If it says command not found, see if you install with "Add python.exe to Path"
    • If already added to path, then try or email me at yz at 9pm dot me for trouble shooting
      python -m pip install you-get
  • Download the video by:
    you-get [Bilibili link]

For more installation guidelines, please visit here.

For example:

# to look for video information
you-get -di
# if the link contains multiple videos, use index_xx.html for individual video
you-get -di

The output looks like

site:                Bilibili
title:               古风恒久远,良曲永流传【古风合集】
streams:             # Available quality and codecs
    [ DEFAULT ] _________________________________
    - format:        flv
      container:     flv
      size:          18.9 MiB (19853917 bytes)
    # download-with: you-get --format=flv [URL]
    - format:        hdmp4
      container:     mp4
      size:          18.7 MiB (19559025 bytes)
    # download-with: you-get --format=hdmp4 [URL]
    - format:        mp4
      container:     mp4
      size:          15.1 MiB (15827299 bytes)
    # download-with: you-get --format=mp4 [URL]

So if you want to download mp4, then run

you-get --format=mp4

And a real example from Hiki:

Q & A & Trouble Shooting

Q1: Where did I download my file?

The downloaded video will be located at whichever folder you run you-get. Below is a brief example how to browse folders in terminal.

For Windows: (anything after # means comments)

C:\WINDOWS\System32\> dir  # list files in current folder
C:\WINDOWS\System32\> D:   # change to D disk
D:\> cd xxx_folder_name   # change to xxx_folder_name
D:\xxx_folder_name\> cd .. # change back to upper folder
D:\> you-get http://xxxxx

For MacOS (or Linux):

~$ ls                  # list files in current folder
~$ cd xxx_folder_name  # change to xxx_folder_name
~$ cd ..               # change back to upper folder
~$ pwd                 # know current folder path
~$ you-get http://xxxxx

Q2: I'm getting UTF-8 locale issues.

you-get: [error] oops, the current environment does not seem to support Unicode.
you-get: please set it to a UTF-8-aware locale first,
you-get: so as to save the video (with some Unicode characters) correctly.
you-get: you can do it like this:
you-get: (Windows) % chcp 65001
you-get: (Linux) $ LC_CTYPE=en_US.UTF-8

Kyo posted this. What you need to do is to run the following as soon as you open the terminal:

  • For MacOS or Linux
    export LC_CTYPE=en_US.UTF-8
  • For Windows
    C:\Windows\System32\cmd.exe /K chcp 65001

Q3: Why there is error downloading through a link?

Recently Bilibili has taken down most of its videos due to pirating issues.

01/15/2018: If you have encountered 403 or 466 error, use the following as a temporary solution:

pip3 install --upgrade

To convert back later when the merge is approved, go back to the original version via:

pip3 install --upgrade

Note: if you find issues downloading the video, try to update you-get using the following command:

pip3 install --upgrade

Also, this method support many other services like Youku, YouTube, Daily Motion, etc. All supported sites are listed here.

Let me know if you get any questions.

About Downloading Member-Only Videos at Bilibili

Some videos are member-only and currently there are no good ways to bypass that and download them. To view the videos, you have to become a member, answering 20-ish questions correctly. They are all in Chinese so you need to know a bit about the language. You cannot copy the words directly since they are embedded in the image. To answer the questions, if you can type in Chinese/Japanese, you can go to to find answers as suggested by findaaaiba. Or you could purchase bilibili account through taobao.

Re-Organized again 🙂 (10/30/2016 05/29/2017 07/15/2017)

Re-organized contents. Since BH-5 is dead for now, I moved it to later parts of the article. Also thank "kimo" for providing an alternative method, but it seems failed on me.

As the ultimate solution is presented, I will no longer implement my own solution. This solution is on GitHub and is well maintained by many people. If ever the service is down, it can be quickly fixed, either by the developers, or by me. Thank you all for being with me for 2 years. 🙂

199 thoughts on “Download videos (and popup comments) from”

  1. Didnt have success with the you-get or others but i found out that the android bilibili app (official) can download videos. Tried it with both phone and android emulator on windows.

  2. Hi, thanks for the PC-based solution.
    I've downloaded and set up the latest Python. It does work but the downloading seems to stall every 3MB ... Am I doing something wrong?

    1. You are not. The problem now is Bilibili is throttling unrecognized users at low speed, though some videos should work. A workaround is to load cookie (login info). It might be a complicated thing to get cookie though.. I'll check if there is a better way.

  3. Wow, discovered a new way to play with Python! Thank you so much for the wonderful and really convenient method!!!!!!!!!

    Just curious though, the downloading speed is rather slow, is it downloading through special route so that it is quite slow?

    1. I checked and you should update you-get now to the developer version. It has a quick workaround solution to fix the speed limiting issue (I have not tried it yet)

  4. Thank you again for the Ultimate Solution. But for more than 1 month now, I also have a problem of not being able to dl using you-get. I always get the error and it won't download. Sometimes, it would be stuck to 3 mb and won't proceed with the the dl. Please help. Thank you~

    1. Hi Hiki, sorry I wasn't on blog for a while. Can you give me a link just as an example? Also please let me know what command you used. I had no problem downloading things.

    2. One idea is to update you-get to the latest version. And maybe Bilibili starts to limit the downloading speed for non-login users. If you have an account, you can try to load cookie to authenticate yourself while downloading.

      1. Hi Yz! Sorry for the late rep. Yup, still couldn't download and it cuts of immediately. I will try to do the log-in though I'm not sure what to do/how to do loading cookie for authentication

        1. The latest version of you-get would download a little bit and reset the connection and continue downloading a bit. And so on so forth. The speed looks reasonable to me (3MB/s) without login. Other than login, you can try to change your ip address (e.g., through a vpn service) and see if the speed changes. The idea is if you download too much, Bilibili might recognize your IP and throttle your speed on purpose..

  5. Hi thank you for your ultimate solution. It was working really well initially but recently the download speed seems to run extremely slow, as slow as 1b/s... I have tried updating you-get like you suggested but it didn't work. Any other suggestions?

    Thanks in advance.

  6. Thank you for your ultimate solution. It was working really well up untill a few weeks ago where the download seems to run extremely slow!! I have tried updating you-get like you suggested and nothing seems to have worked. Are you able to help?

    Many thanks in advance!

  7. About the download, i still can download it with Uc browser or Internet download manager, but the download speed so slow and like take a week to finish
    sorry for my bad english

    1. Yep, so try to use you-get instead. The download speed is slow because you use an online web interface, which shares the single IP with so many different people using the same service. So Bilibili server throttles/limits the downloading speed. With you-get, you have your own IP which doesn't share with others. And thus your downloading speed should max out your bandwidth depending on your Internet server.

  8. Thank you for the Ultimate Solution. I've just downloaded high-quality video from bilibili 😀 and the only programming language I know is HTML 😉 I studied your instruction 3 times before downloading Python but everything went smoothly for me. I only had a small problem with locating the file after download but I used Windows search.

    Do I understand correctly, every time I download something I need to change folder from the default to the one where I want to keep the file?

    1. Yes you need to do that. You can also try to write a small program to automate the process (like get into other folder every time you run you-get) 🙂

  9. the ibilibili method isn't working for me
    i'm logging in and the download page appears, but when i click to download the video it gives me a 下载高清视频 pop up and two options: 原始地址 and 迅雷下载
    the first one shows me this:

    and the second one just closes the pop up
    what am i supposed to do to make it work?

    1. Yes, the first one doesn't work as they check the visiting source (banned 403 error if you are not one of its recognized server device). The second one requires you to install a Chinese downloading software. Please leverage the You-Get solution instead, which I believe is the most stable solution and won't be obsolete for quite a while.

  10. Thank you very much! I had made a simple mistake, but after you updated the post with a clearer explanations and pictures it was a very simple process. I finally got it! Seriously, thank you so much. The fact that you sent an private email to me shows how much you dedicated yourself to solving our problems. I wish you nothing but the best!

  11. Hello everyone. I have tried all the methods but it seems like it's impossible to download videos from bilibili. I have tried logging into a QQ account to use the iBilibili method, but it's a no-go. It says my phone number is invalid. I have found some alternative simple methods, but they all download the video in low framerate and 360p. The Python method is far too complicated. It took me a couple hours to actually install it (i use windows). After trying for an hour to get you to work, testing multiple methods (pip, standalone package, github, etc) I realized coding is not for me. I've read some stuff about adding files to a PATH on the windows environment variables, but nobody made a clear tutorial on how to do it. For Windows at least, it's very hard. You-Get is essentialy for people who are used to coding. I guess I should just give up ... Thanks for all your hard work though. Few people on modern day internet dedicate themselves this much to solve a problem. Everyone wants an easy way to do things. That's why, even with my inability to carry on the ultimate method, I'm still thankfull to you. Have a nice day!

    1. Hey, don't give up! I'm sorry about I did not make this clearer. I just updated the tut with figures, especially on how to setup PATH the easy way (which lets the software do it for you when you install Python). Please give it a try. And you can totally email me so we can walk this through. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *