Bilibili Downloader
A bilibili video downloader app built by Tauri, Vue and Rust!
Explore the docs »
View Demo · Report Bug · Request Feature
Table of Contents
About The Project
This is a Downloader for bilibili built by Tauri and Rust.
<iframe src="//player.bilibili.com/player.html?aid=953038969&bvid=BV1Ts4y1w7Yd&cid=1114294158&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" height="480px"> </iframe>Important
ffmpeg
You need ffmpeg
to merge the video and audio downloaded. Official download is here.
So, for MacOS, you need use brew to install ffmpeg, or just download one and put it into /usr/local/bin
. Then you need use which ffmpeg
to get the detailed path of it, and paste it in the app's setting, or you can't invoke the ffmpeg
in released tauri app. (The chat-GPT says Unix can not get path
in release version)
Moreover, due to the apple developer is expensive, so I can not provide an arch version. But the x64 version in release page can still be used, just remember opening it by right clicking the app icon and select open for the first time. And you should also permit your Mac allowing unknown source app in the system setting.
For Windows, downloading the ffmpeg
and adding it to path are enough. Recommend this portable version. Official version is also Ok certainly.
You could also specify a path to ffmpeg
as you like in settings.
An important new feature: Key Chain
For protecting your account security, from v0.0.4 on, I'll use the system key manager to protect your bilibili cookie. This is implemented by a rust crate called keyring
.
For example, it will use key chain
(AKA 钥匙串访问.app
in Chinese macOS system) to manage the bilibili downloader's config including cookie. That will be much safer if you don't allow other apps to visit it.
Don't be worried as you can see the system having told you bili downloader only ask for one key with a name called bili downloader
which will be created by the app itself later. Getting Always allow
option chosen will be greatly convinient for you.
What's less important, you should ensure your system has Environment variable
named USERNAME
. However, almost all system has it. If not, the app will just panic. Check it by echo $USERNAME
in Linux or Unix like system or Get-ChildItem Env: | findstr USERNAME
in powershell of Windows as you like for it's usually unnecessary.
If you don't like the app and decide to uninstall it, just deleting the key named bilibili downloader
in key chain
in macOS is OK. Other system I'm sorry I don't known.
And if the cookie is too long, it will also panic. All you need is just the ESSADATA
line of the cookie. (where to find cookie)
By the way, many apps like vscode or adobe save the key info through the same way.
Last, I don't know how Windows protect the cookie. That's strange the system didn't ask permission when I test the app on Windows.
Advantages
Here are advantages:
- Simultaneous downloads: This downloader can potentially download multiple videos at once, making it a faster and more efficient tool for users.
- Reduced storage space: A smaller-sized image downloader can potentially take up less space on the user's device, which is especially beneficial for devices with limited storage capacity.
Built With
Getting Started
You can compile by yourself, or just got release here.
Prerequisites
You need rust, tauri-cli, npm first.
- npm
npm install npm@latest -g
- tauri
cargo install create-tauri-app
And maybe you need this Tauri Quick Start for further infomation.
Compile
- Clone the repo
git clone https://github.com/kingwingfly/bilibili-downloader-rs.git cd bilibili-downloader-rs
- Install NPM packages
npm install
- start compile
cargo tauri build
Usage
Maybe you can get cookie through your browser.
Roadmap
- Keep config
- Fix bug: fast switch before the real download beginning will lead range downloads out of sync
- The real pause of resp.chunk()
- Lazily check restart
- Performance optimize
- Encrypt cookie
- Limit the download speed in default
- Remind user to like, coin and collection
- File name check
- Use JoinSet replace jhs
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Contact
Louis - @email - [email protected]
Project Link: https://github.com/kingwingfly/bilibili-downloader-rs
Acknowledgments
Some document may help in developing tauri app and crawler.