Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

A bilibili downloader built by Tauri and the language you-know-who. This repo is yanked, https://github.com/kingwingfly/downloader is the new version.

Notifications You must be signed in to change notification settings

kingwingfly/bilibili-downloader-rs

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. Contact
  7. Acknowledgments

About The Project

Product Name Screen Shot

Product Architecture

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.

ffmpeg_setting.

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.

warning

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)

delete key

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.

(back to top)

Built With

  • Rust
  • Tauri
  • Tokio
  • Vue

(back to top)

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

  1. Clone the repo
    git clone https://github.com/kingwingfly/bilibili-downloader-rs.git
    cd bilibili-downloader-rs
  2. Install NPM packages
    npm install
  3. start compile
    cargo tauri build

(back to top)

Usage

Maybe you can get cookie through your browser.

cookie_get cookie_setting

(back to top)

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).

(back to top)

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Louis - @email - [email protected]

Project Link: https://github.com/kingwingfly/bilibili-downloader-rs

(back to top)

Acknowledgments

Some document may help in developing tauri app and crawler.

(back to top)


About

A bilibili downloader built by Tauri and the language you-know-who. This repo is yanked, https://github.com/kingwingfly/downloader is the new version.

Resources

Stars

Watchers

Forks

Packages

No packages published