👇 Command-line downloader for Crunchyroll
Find a file
2023-01-10 22:15:36 +01:00
.github Change rust actions used 2022-12-18 12:50:35 +01:00
crunchy-cli-core Update dependencies and version 2023-01-10 22:15:36 +01:00
src Rewrite it in Rust 2022-11-24 15:30:49 +01:00
.gitignore add minimal .gitignore (#83) 2022-12-16 16:09:52 +01:00
build.rs Update dependencies 2022-12-16 10:09:41 +01:00
Cargo.lock Update dependencies and version 2023-01-10 22:15:36 +01:00
Cargo.toml Update dependencies and version 2023-01-10 22:15:36 +01:00
LICENSE Change license to GPL-3.0 2022-06-27 22:31:36 +02:00
README.md Add pre-release notice 2022-12-18 15:03:16 +01:00

crunchy-cli

A Rust written cli client for Crunchyroll.

Code size Download Badge License Release Discord CI

Usage 🖥️Disclaimer ☝️License ⚖

We are in no way affiliated with, maintained, authorized, sponsored, or officially associated with Crunchyroll LLC or any of its subsidiaries or affiliates. The official Crunchyroll website can be found at https://crunchyroll.com/.

This README belongs to the master branch which is currently under heavy development towards the next major version (3.0). It is mostly stable but some issues may still occur. If you do not want to use an under-development / pre-release version, head over to the golang branch which contains the EOL but last stable version (and documentation for it).

Features

  • Download single videos and entire series from Crunchyroll.
  • Archive episode or seasons in an .mkv file with multiple subtitles and audios.
  • Specify a range which episodes to download from an anime.

💾 Get the executable

📥 Download the latest binaries

Checkout the releases tab and get the binary from the newest (pre-)release.

🛠 Build it yourself

Since we do not support every platform and architecture you may have to build the project yourself. This requires git and Cargo.

$ git clone https://github.com/crunchy-labs/crunchy-cli
$ cd crunchy-cli
$ cargo build --release

After the binary has built successfully it is available in target/release.

🖥️ Usage

All shown command are just examples

Every command requires you to be logged in with an account. It doesn't matter if this account is premium or not, both works (but as free user you do not have access to premium content). You can pass your account via credentials (username & password) or refresh token.

  • Refresh Token
    • To get the token you have to log in at crunchyroll.com and extract the etp_rt cookie. The easiest way to get it is via a browser extension with lets you view your cookies, like Cookie-Editor (Firefox Store; Chrome Store). If installed, search the etp_rt entry and extract the value.
    • $ crunchy --etp-rt "abcd1234-zyxw-9876-98zy-a1b2c3d4e5f6"
      
  • Credentials
    • Credentials must be provided as one single expression. Username and password must be separated by a :.
    • $ crunchy --credentials "user:password"
      
  • Anonymous
    • Login without an account at all is also possible.
    • $ crunchy --anonymous
      

Login

If you do not want to provide your credentials every time you execute a command, they can be stored permanently on disk. This can be done with the login subcommand.

$ crunchy --etp-rt "abcd1234-zyxw-9876-98zy-a1b2c3d4e5f6" login

Once set, you do not need to provide --etp-rt / --credentials anymore when using the cli. This does not work if you've using this with --anonymous.

Download

Supported urls

  • Single episode

    $ crunchy download https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
    
  • Episode range

    If you want only specific episodes / seasons of an anime you can easily provide the series url along with a filter. The filter has to be attached to the url. See the wiki for more information

    $ crunchy download https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx[E1]
    
  • Series

    $ crunchy download https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

Options

  • Audio language

    Which audio the episode(s) should be can be set via the -a / --audio flag. This only works if the url points to a series since episode urls are language specific.

    $ crunchy download -a de-DE https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is your system language. If not supported by Crunchyroll, en-US (American English) is the default.

  • Subtitle language

    Besides the audio, it's also possible to specify which language the subtitles should have with the -s / --subtitle flag. The subtitle will be hardsubbed (burned into the video) and thus, can't be turned off or on.

    $ crunchy download -s de-DE https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is no subtitle.

  • Output filename

    You can specify the name of the output file with the -o / --output flag. If you want to use any other file format than .ts you need ffmpeg.

    $ crunchy download -o "ditf.ts" https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
    

    Default is {title}.ts.

  • Resolution

    The resolution for videos can be set via the -r / --resolution flag.

    $ crunchy download -r worst https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
    

    Default is best.

Archive

Supported urls

  • Series

    Only series urls are supported since single episode urls are (audio) language locked.

    $ crunchy archive https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

Options

  • Audio languages

    Which audios the episode(s) should be can be set via the -a / --audio flag.

    $ crunchy archive -a ja-JP -a de-DE https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Can be used multiple times. Default is your system language (if not supported by Crunchyroll, en-US (American English) is the default) + ja-JP (Japanese).

  • Subtitle languages

    Besides the audio, it's also possible to specify which languages the subtitles should have with the -s / --subtitle flag.

    $ crunchy archive -s de-DE https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is all subtitles.

  • Output filename

    You can specify the name of the output file with the -o / --output flag. The only supported file / container format is .mkv since it stores / can store multiple audio, video and subtitle streams.

    $ crunchy archive -o "{title}.mkv" https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is {title}.mkv.

  • Resolution

    The resolution for videos can be set via the -r / --resolution flag.

    $ crunchy archive -r worst https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is best.

  • Merge behavior

    Because of local restrictions (or other reasons) some episodes with different languages does not have the same length (e.g. when some scenes were cut out). The ideal state, when multiple audios & subtitles used, would be if only one video has to be stored and all other languages can be stored as audio-only. But, as said, this is not always the case. With the -m / --merge flag you can set what you want to do if some video lengths differ. Valid options are audio - store one video and all other languages as audio only; video - store the video + audio for every language; auto - detect if videos differ in length: if so, behave like video else like audio. Subtitles will always match to the first / primary audio and video.

    $ crunchy archive -m audio https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is auto.

  • Default subtitle

    --default_subtitle set which subtitle language should be set as default / auto appear when starting the downloaded video(s).

    $ crunchy archive --default_subtitle en-US https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

    Default is none.

  • No subtitle optimizations

    Subtitles, as Crunchyroll delivers them, look weird in some video players (#66). This can be fixed by adding a specific entry to the subtitles. But since this entry is only a de-factor standard and not represented in the official specification of the subtitle format (.ass) it could cause issues with some video players (but no issue got reported so far, so it's relatively safe to use). --no_subtitle_optimizations can disable these optimizations.

    $ crunchy archive --no_subtitle_optimizations https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
    

☝️ Disclaimer

This tool is ONLY meant to be used for private purposes. To use this tool you need crunchyroll premium anyway, so there is no reason why rip and share the episodes.

The responsibility for what happens to the downloaded videos lies entirely with the user who downloaded them.

⚖ License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for more details.