Just found a nice website that analyzes the video path and so we could download the videos that are on bilibili.com! As of today when I post this, the webpage ibilibili.com is still alive.
03/12/2017: Some people are wondering about downloading the popup comments in bilibili. Note that ibilibili.com should give you that as well (so Method 1 should be enough). If something is wrong, you can go on and read Method 2, assuming it's alive.
06/05/2017: Something to note. Member-only videos (non public videos) cannot be downloaded right now. Keyword test: 다운로드, 下载, 下載, ダウンロード, descargar, скачать, ดาวน์โหลด
The Ultimate Solution
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 https://www.python.org/downloads/
- 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
- If you use Windows, open up the command window as Administrator
- 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 http://www.bilibili.com/video/av854324/
# if the link contains multiple videos, use ?p=xx for individual video
you-get -di http://www.bilibili.com/video/av854324/?p=65
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 http://www.bilibili.com/video/av854324/index_65.html
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:
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 https://github.com/ygmpkk/you-get/archive/develop.zip
To convert back later when the merge is approved, go back to the original version via:
pip3 install --upgrade https://github.com/soimort/you-get/archive/master.zip
Note: if you find issues downloading the video, try to update you-get using the following command:
pip3 install --upgrade https://github.com/rosynirvana/you-get/archive/master.zip
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.
The New Method: BilibiliJJ (06/28/2017)
Another one! While I'm still working on it, here is another one you can try. Like iBilibili, you can add JJ after bilibili and get the download links (warning: many ads, but please don't use Adblocker to support the developer).
For example, if you go to a video page like
http://www.bilibili.com/video/av2555634/
You can just add "jj" after "bilibili" like
http://www.bilibilijj.com/video/av2555634/
Then you will see "MP4/MP3下载" for each video (if there are parts, they are in separate blocks). Just click on those, you will be redirected to a page with the downloading link.
Then it is a tricky part. For example you get to the page
http://www.jijidown.com/FreeDown/3992726.php
Then you need to right click the first blue button that says "迅雷下载". Then you will get a link like:
thunder://QUFodHRwOi8vd3d3Lmppamlkb3duLmNvbS9GcmVlRG93bi9Eb3duTG9hZC8xNDk4NzE1OTk2L21wNC8zOTkyNzI2LjY5NkJEOTRBMzEzNTBCMkMxNDVFNjUwNzAwQ0VBOUExWlo=
Use this site to translate that link to a normal url, like shown below:
The first is the Thunder link, and the second is the real link. So the actual video download link would be:
http://www.jijidown.com/FreeDown/DownLoad/1498715996/mp4/3992726.696BD94A31350B2C145E650700CEA9A1
Hope this works for many of you. Let me know.
Method 0: DPlayer's API
06/15/2017: these services are never so stable... Hiki mentioned 403 permission error occurs. Maybe it's time to start my own parser. As of 06/28/2017, we still get 403 errors.
Great news, guys! I find this API link for analyzing bilibli video links and we can definitely use it for video downloading (just like BH-5). It's not as simple as putting an "i" in front of the link, but since iBilibili now requires you to register and login and then download, I believe we should name this method "ZERO" for its current up status.
Ready?
If you want to get the video to download in
http://www.ibilibili.com/video/av10673439/
Then just use the link
https://api.prprpr.me/dplayer/video/bilibili?aid=10673439
For the popup comments (I learned from there that it should be called "DanMuKu"), use the link
https://api.prprpr.me/dplayer/bilibili?aid=10673439
The only issue is I have not figured out how to find the CID of each video, so we cannot download multiple videos in one link right now. But, hey, this is a great start!
Method 1 (simplest): iBilibili
05/16/2017: iBilibili has requested all visitors to register a QQ account and sign in to prevent content leakage to other sites. This is bad because the method is getting more complicated, if you don't have QQ already.. I believe you can go here to register it (in English, thank god...).
The trick is simple. When you go to a video page like
http://www.bilibili.com/video/av2555634/
You can just add "i" before "bilibili" like
http://www.ibilibili.com/video/av2555634/
That is it!
Detailed Instruction for iBilibili (04/22/2016)
Kinda surprised many people love bilibili. In comments people are a little confused on how to download the video. Below is a brief tutorial.
Say you have visited http://www.ibilibili.com/video/av2555634/
and want to download the video. If there are multiple videos embedded/posted, then it'll show multiple links. For example,

Each row is one video, from left to right these are "click to watch the video", "parse low quality mp4", "download video (video size)", "MP3 download (mp3 size)" (disabled I think), "show QR code to download", "download popup comments".
If there is only one video, it might show the following instead.

From left to right these are "mobile video" (mp4 format), "mobile QR code", "HD video" (flv format, might be broken), "popup comments", "screenshot", and "parse via JiJi" (seems broken and only ads are showing).
Method 2: Bilibili Helper (05/29/2017, segmented video downloader)
So if you are using Chrome, I just find an extension to help download Bilibili videos (segmented videos only). You can click here to install the extension.
I have tried it and certainly this is so far (05/29) THE best alternative to iBilibili. After you install the extension, it'll pop up and ask you to agree to use the helper (green button). There are plenty functionalities, and by default the downloader is enabled. You might need to restart Chrome browser to allow it to work.
To test it, simply go to any bilibili video, and then you will see the following options.

The cat is the helper menu, and from top to bottom they are: video download, popup comment search, popup comment download (XML format or ASS format).
The only downside of this method is that, if you plan to download a movie for example, you will see tens of download links. The movie is segmented into multiple parts and you have to download them piece by piece. But, you know, this is better than nothing (if iBilibili is out of concern).
Method 3: BH-5 (dead as of 06/05/2017)
I have hidden the contents for your benefit. If it is not hidden, it means BH-5 (bilibilih5.club) comes back alive..
NOTE: the webpage now has some parsing issues for different parts. Only the first part can be accessed. Use Method 1 if possible. (11/05/2016) the problem has been fixed as of 11/27/2016, cheers!
NOTE2: as of 12/11/2016, BH-5 is down again.. yes, again.. I guess it has to do with bilibili internal changes on its player. The good news is bilibili is using HTML5 as its player now. Maybe we can do something easier just like BH-5. Stay tuned.
Note3: Great news! I just found BH-5 is coming alive again (as of 02/28/2017)! Yay! I'm a bit tired in this because it keeps going down and up, back and forth. Currently it's down again (05/07/2017, thanks to Hiki). I will mark this as an unstable site. Because of this, I will work on my own site to download bilibili videos (as one of my personal projects in summer).
People were having some issues downloading videos using ibilibili.com
. Here I find another nice website that is essentially a html5 version of bilibili. Why that's good? Because you can directly right click on the video and do "Save as..."
The website is http://www.shiroblue.cn/ or http://bilibilih5.club/ (same site, different domain names) (obviously the web owner has permanently switched to the new domain name).
Either you copy the name of the video and search for it, or do the following.
Suppose (@moon) had http://www.bilibili.com/video/av5047810 but it fails on the iBilibili method. Using the last few digits, we convert the link into:
http://bilibilih5.club/#/view/5047810
Now first click the video to play, and wait for the video playing, then right click on the video, we see "Save video as..." is there waiting for you.
It would also work if you replace "http://www.shiroblue.cn/" with "http://bilibilih5.club/".
Sometimes the video stuck after we click it to play, and "Save as" might not work as expected. A solution I can think of is to refresh the page, choose a different source (like "backup:1" if there is one), and then try again. This method has been deprecated since the website player no longer provides "source" option. If this does not work, post link here and I'll try to help you.
03/12/2017 update about "popup comments". In case you wonder about how to download popup comments in BH-5, I can tell you there is a not-so-simple way. BH-5 gives the option to display the comments, which allow us to download the popup comments. But it needs some efforts. Detailed step below.
- Assume you find BH-5 link: http://bilibilih5.club/#/view/9068328 and you are using Chrome browser.
- Turn on the "Developer Tool" in Chrome as shown below:

- Click the "network" tab, and go to the BH-5 link (or refresh the page if you are already there). Then you will see the following xml file (must be some numbers)

- Congratulations, you have found the popup comments!
Method 4: FLVCD or other online video downloader
As many people from the comments suggested, it seems online video downloader is the best option so far. Here are a recommended list coming from the comments. Feel free to comment and add more.
Just be aware there might be ads.
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 https://www.zhengjie.com/ 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 vdYoutube.com
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. 🙂
I can't believe I'm still updating this post, after 3 years :O (08/30/2018)
Hi. May I ask how to download a part of one video (I don't want to download the whole video, just a part of it)? Thank you for the instruction 😀
If it is already split into parts, then you can download a particular one using something like
/?p=2
. But if it's not, then you have to download the entire one and split it on your own.Help me, I need a method that I can download Bilibili in 1080p.
Please.
If you append
-i
after you-get, you will see all possible resolutions you can download. They will mark 1080p if it is there.Seems like downloading a playlist / multiple videos using /index_xx.html doesn't work anymore?
Hi Hiki! Glad to see you again. I haven't been tracking bilibili downloading for a while, but
you-get
still works fine even if it has playlist (multiple parts). There is some changes though. Instead of using/index_xx.html
, use/?p=xx
, and herexx
means 1, 2, 3, 4, ...Hi again, Yz! Glad to see you again and thank you for all the help! Bilibili interface has changed so much but thank heavens you-get still works. Thank you for the new instruction! I was confused and lost when the /index_xx.html function didn't work. Will try the new one! Thank you!!!
Update: Tried using the new URL [ /?p=2 ] on a two-part video playlist but still only the first vid gets downloaded and the second part cannot...
Did you update you-get to the latest version? I can download it..
I have the same problem as Hiki too, I cannot get the second part to download in a playlist with using [ /?p=2 ] or [ /index_xx.html ]
Can you please paste a line of code you were trying to use? The following is what I get (when you paste
/?p=2
it shall be automatically converted as/\?p\=2
(but it isn't doing it, maybe that is why?))you-get -di "http://www.bilibili.com/video/av854324/\?p\=65"
[DEBUG] url_locations: http://www.bilibili.com/video/av854324/\?p\=65
[DEBUG] get_content: https://www.bilibili.com/video/av854324/\?p\=65
you-get: This page contains a playlist. (use --playlist to download all videos.)
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=116&quality=116&type=&sign=0fcf92d38b96e1f25fd14010df29cbd5
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=112&quality=112&type=&sign=ad36511907441a37e4f4ceeb083086ac
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=80&quality=80&type=&sign=1ed126248ceefe22e27a77a5b865f221
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=74&quality=74&type=&sign=5f3182b38e6e34f0c3b3bdfaca3034ee
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=64&quality=64&type=&sign=08da0efff96bb54d4615c6a2a314aaea
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=32&quality=32&type=&sign=185acc2195a0b2aa2f74328151a129d6
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=16&quality=16&type=&sign=17fb0abad4d00b3d3847308afb64417e
[DEBUG] get_content: http://interface.bilibili.com/v2/playurl?appkey=84956560bc028eb7&cid=1241935&otype=xml&qn=15&quality=15&type=&sign=6defb04f7460c09b01144bb33040d2fe
site: Bilibili
title: 古风恒久远,良曲永流传【古风合集】 #1. 『琴师』by 音频怪物
streams: # Available quality and codecs
[ DEFAULT ] _________________________________
- format: hdflv
container: flv
size: 73.2 MiB (76710517 bytes)
# download-with: you-get --format=hdflv [URL]
- format: flv720
container: flv
size: 51.5 MiB (53993906 bytes)
# download-with: you-get --format=flv720 [URL]
- format: flv
container: flv
size: 51.5 MiB (53993906 bytes)
# download-with: you-get --format=flv [URL]
- format: mp4
container: mp4
size: 21.6 MiB (22617556 bytes)
# download-with: you-get --format=mp4 [URL]
Hi Yz! Long time no see. Happy holidays!
I have the latest version and recently I can only download from Youtube and can't download from Bilibili anymore, always getting the ooops something went wrong error... *cry*
hey Hiki! glad you are still around! can you give me a link? I used
you-get -di "http://www.bilibili.com/video/av854324/\?p\=65"
and it still works.Hi i ask if it work with https://m.bilibili.com/video/av13438015.html format??
yep it should work fine
Oh mon dieu, I love you so much from france !
Can you help me? It won't work on me. Saying it all the python I installed was not on latest version? I downloaded the one you gave and even check on python site if it was updated, and yes it did but still it says the same in the end.
What exactly does it say? Can you paste the entire message here so I can check?
If it says something like pip not latest version, follow the instruction and run something like `pip install --upgrade pip`. Let me know if that is the case for you.
Hi, I seem to have some problems downloading from bilibili using you-get for around a few months now.
https://cdn.discordapp.com/attachments/363678998783590405/402078424182685696/Capturezz.PNG
I'll post a solution to this soon. The idea to solve 403 issue is to change header and user-agent info.
try to use this guy's repo:
pip3 install --upgrade https://github.com/ygmpkk/you-get/archive/develop.zip
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.
That's an excellent solution as well! In fact you-get is operating similarly to emulators 🙂
Hi
I get the same error so I try download with bilibili app and it works!
but i don know how to save it
Can you help me please?
I don know Chinese at all
what error did you get?
and yea, if you can email me at `yz at 9pm dot me` and share me a few screenshot, I'll be glad to help out
Thank you very much! it works perfectly for me after so many try! XD thanks! 🙂
Np! Glad it worked out for you
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?
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.
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?
How slow is it?
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)
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~
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.
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.
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
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..
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.
Will check.
On my computer it is fine. Can you please get me a screenshot and the example link to download?
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!
Will check.
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
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.
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?
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) 🙂
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:
推荐使用360浏览器自带的下载工具下载:
http://cn-sdjn-cmcc-v-05.acgvideo.com/vg0/f/ea/13701639-1-hd.mp4?expires=1502846700&platform=pc&ssig=1OY8s1e3WO8_BxmV9fP6DA&oi=2032836324&nfa=iCnd1wqqoAsXLyv+e2tfVA==&dynamic=1&hfa=2074126042&hfb=Yjk5ZmZjM2M1YzY4ZjAwYTMzMTIzYmIyNWY4ODJkNWI=
and the second one just closes the pop up
what am i supposed to do to make it work?
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.
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!
Glad it worked out!
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!
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. 🙂
hii how to download from ibilibili after logging in QQ? im so confused ;-;
if you logged in with QQ, then just add 'i' to the bilibili page and you should be able to download..
I would recommend to use you-get though. It is way more easier and reliable to do.