crunchy-cli

crunchy-cli

命令行动漫下载工具 为Crunchyroll用户定制

crunchy-cli是一款为Crunchyroll平台开发的命令行下载工具。它能够下载单集视频或完整系列,支持将内容存档为.mkv格式,并包含多语言字幕和音轨。工具允许用户设定下载范围,检索Crunchyroll内容库,并提取元数据。crunchy-cli提供多项实用功能,包括音频语言选择、字幕配置和输出模板自定义等,方便用户高效管理和下载所需的动漫内容。

crunchy-cli命令行工具Crunchyroll下载器动画Github开源项目

This project has been sunset as Crunchyroll moved to a DRM-only system. See #362.

crunchy-cli

👇 A Command-line downloader for Crunchyroll.

<p align="center"> <a href="https://github.com/crunchy-labs/crunchy-cli"> <img src="https://img.shields.io/github/languages/code-size/crunchy-labs/crunchy-cli?style=flat-square" alt="Code size"> </a> <a href="https://github.com/crunchy-labs/crunchy-cli/releases/latest"> <img src="https://img.shields.io/github/downloads/crunchy-labs/crunchy-cli/total?style=flat-square" alt="Download Badge"> </a> <a href="https://github.com/crunchy-labs/crunchy-cli/blob/master/LICENSE"> <img src="https://img.shields.io/github/license/crunchy-labs/crunchy-cli?style=flat-square" alt="License"> </a> <a href="https://github.com/crunchy-labs/crunchy-cli/releases"> <img src="https://img.shields.io/github/v/release/crunchy-labs/crunchy-cli?include_prereleases&style=flat-square" alt="Release"> </a> <a href="https://discord.gg/PXGPGpQxgk"> <img src="https://img.shields.io/discord/994882878125121596?label=discord&style=flat-square" alt="Discord"> </a> <a href="https://github.com/crunchy-labs/crunchy-cli/actions/workflows/build.yml"> <img src="https://img.shields.io/github/actions/workflow/status/crunchy-labs/crunchy-cli/build.yml?branch=master&style=flat-square" alt="Build"> </a> </p> <p align="center"> <a href="#%EF%B8%8F-usage">Usage 🖥️</a> • <a href="#-disclaimer">Disclaimer 📜</a> • <a href="#-license">License ⚖</a> </p>

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 www.crunchyroll.com.

✨ Features

  • Download single videos and entire series from Crunchyroll.
  • Archive episodes or seasons in an .mkv file with multiple subtitles and audios.
  • Specify a range of episodes to download from an anime.
  • Search through the Crunchyroll collection and return metadata (title, duration, direct stream link, ...) of all media types.

💾 Get the executable

📥 Download the latest binaries

Check out the releases tab and get the binary from the latest (pre-)release.

📦 Get it via a package manager

  • AUR

    If you're using Arch or an Arch based Linux distribution you are able to install our AUR package. You need an AUR helper like yay to install it.

    # this package builds crunchy-cli manually (recommended) $ yay -S crunchy-cli # this package installs the latest pre-compiled release binary $ yay -S crunchy-cli-bin
  • Scoop

    For Windows users, we support the scoop command-line installer.

    $ scoop bucket add extras $ scoop install extras/crunchy-cli
  • Homebrew

    For macOS/linux users, we support the brew command-line installer. Packages are compiled by the homebrew project, and will also install the openssl@3 and ffmpeg dependencies.

    $ brew install crunchy-cli

    Supported archs: x86_64_linux, arm64_monterey, sonoma, ventura

  • Nix

    This requires nix and you'll probably need --extra-experimental-features "nix-command flakes", depending on your configurations.

    $ nix <run|shell|develop> github:crunchy-labs/crunchy-cli

🛠 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 # either just build it (will be available in ./target/release/crunchy-cli)... $ cargo build --release # ... or install it globally $ cargo install --force --path .

🖥️ Usage

All shown commands are examples 🧑🏼‍🍳

Global Flags

crunchy-cli requires you to log in. Though you can use a non-premium account, you will not have access to premium content without a subscription. You can authenticate with your credentials (email:password) or by using a refresh token.

  • <span id="global-credentials">Credentials</span>

    $ crunchy-cli --credentials "email:password" <command>
  • <span id="global-anonymous">Stay Anonymous</span>

    Login without an account (you won't be able to access premium content):

    $ crunchy-cli --anonymous <command>

Global settings

You can set specific settings which will be

  • <span id="global-verbose">Verbose output</span>

    If you want to include debug information in the output, use the -v / --verbose flag to show it.

    $ crunchy-cli -v <command>

    This flag can't be used in combination with -q / --quiet.

  • <span id="global-quiet">Quiet output</span>

    If you want to hide all output, use the -q / --quiet flag to do so. This is especially useful if you want to pipe the output video to an external program (like a video player).

    $ crunchy-cli -q <command>

    This flag can't be used in combination with -v / --verbose.

  • <span id="global-lang">Language</span>

    By default, the resulting metadata like title or description are shown in your system language (if Crunchyroll supports it, else in English). If you want to show the results in another language, use the --lang flag to set it.

    $ crunchy-cli --lang de-DE <command>
  • <span id="global-experimental-fixes">Experimental fixes</span>

    Crunchyroll constantly changes and breaks its services or just delivers incorrect answers. The --experimental-fixes flag tries to fix some of those issues. As the experimental in --experimental-fixes states, these fixes may or may not break other functionality.

    $ crunchy-cli --experimental-fixes <command>

    For an overview which parts this flag affects, see the documentation of the underlying Crunchyroll library, all functions beginning with stabilization_ are applied.

  • <span id="global-proxy">Proxy</span>

    The --proxy flag supports https and socks5 proxies to route all your traffic through. This may be helpful to bypass the geo-restrictions Crunchyroll has on certain series. You are also able to set in which part of the cli a proxy should be used. Instead of a normal url you can also use: <url>: (only proxies api requests), :<url> (only proxies download traffic), <url>:<url> (proxies api requests through the first url and download traffic through the second url).

    $ crunchy-cli --proxy socks5://127.0.0.1:8080 <command>

    Make sure that proxy can either forward TLS requests, which is needed to bypass the (cloudflare) bot protection, or that it is configured so that the proxy can bypass the protection itself.

  • <span id="global-user-agent">User Agent</span>

    There might be cases where a custom user agent is necessary, e.g. to bypass the cloudflare bot protection (#104). In such cases, the --user-agent flag can be used to set a custom user agent.

    $ crunchy-cli --user-agent "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)" <command>

    Default is the user agent, defined in the underlying library.

  • <span id="global-speed-limit">Speed limit</span>

    If you want to limit how fast requests/downloads should be, you can use the --speed-limit flag. Allowed units are B (bytes), KB (kilobytes) and MB (megabytes).

    $ crunchy-cli --speed-limit 10MB

Login

The login command can store your session, so you don't have to authenticate every time you execute a command.

# save the refresh token which gets generated when login with credentials. # your email and password won't be stored at any time on disk $ crunchy-cli login --credentials "email:password"

With the session stored, you do not need to pass --credentials / --anonymous anymore when you want to execute a command.

Download

The download command lets you download episodes with a specific audio language and optional subtitles.

Supported urls

  • Single episode (with episode filtering)
    $ crunchy-cli download https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
  • Series (with episode filtering)
    $ crunchy-cli download https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx

Options

  • <span id="download-audio">Audio language</span>

    Set the audio language with the -a / --audio flag. This only works if the url points to a series since episode urls are language specific.

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

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

  • <span id="download-subtitle">Subtitle language</span>

    Besides the audio, you can specify the subtitle language by using the -s / --subtitle flag. In formats that support it (.mp4, .mov and .mkv ), subtitles are stored as soft-subs. All other formats are hardsubbed: the subtitles will be burned into the video track (cf. hardsub) and thus can not be turned off.

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

    Default is none.

  • <span id="download-output">Output template</span>

    Define an output template by using the -o / --output flag.

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

    Default is {title}.mp4. See the Template Options section below for more options.

  • <span id="download-output-specials">Output template for special episodes</span>

    Define an output template which only gets used when the episode is a special (episode number is 0 or has non-zero decimal places) by using the --output-special flag.

    $ crunchy-cli download --output-specials "Special EP - {title}" https://www.crunchyroll.com/watch/GY8D975JY/veldoras-journal

    Default is the template, set by the -o / --output flag. See the Template Options section below for more options.

  • <span id="download-universal-output">Universal output</span>

    The output template options can be forced to get sanitized via the --universal-output flag to be valid across all supported operating systems (Windows has a lot of characters which aren't allowed in filenames...).

    $ crunchy-cli download --universal-output -o https://www.crunchyroll.com/watch/G7PU4XD48/tales-veldoras-journal-2
  • <span id="download-resolution">Resolution</span>

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

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

    Default is best.

  • <span id="download-language-tagging">Language tagging</span>

    You can force the usage of a specific language tagging in the output file with the --language-tagging flag. This might be useful as some video players doesn't recognize the language tagging Crunchyroll uses internally.

    $ crunchy-cli download --language-tagging ietf https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
  • <span id="download-ffmpeg-preset">FFmpeg Preset</span>

    You can specify specific built-in presets with the --ffmpeg-preset flag to convert videos to a specific coding while downloading. Multiple predefined presets how videos should be encoded (h264, h265, av1, ...) are available, you can see them with crunchy-cli download --help. If you need more specific ffmpeg customizations you could either convert the output file manually or use ffmpeg output arguments as value for this flag.

    $ crunchy-cli download --ffmpeg-preset av1-lossless https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
  • <span id="download-ffmpeg-threads">FFmpeg threads</span>

    If you want to manually set how many threads FFmpeg should use, you can use the --ffmpeg-threads flag. This does not work with every codec/preset and is skipped entirely when specifying custom ffmpeg output arguments instead of a preset for --ffmpeg-preset.

    $ crunchy-cli download --ffmpeg-threads 4 https://www.crunchyroll.com/watch/GRDQPM1ZY/alone-and-lonesome
  • <span id="download-skip-existing">Skip existing</span>

    If you re-download a series but want to skip episodes you've already downloaded, the --skip-existing flag skips the already existing/downloaded files.

    $ crunchy-cli download --skip-existing https://www.crunchyroll.com/series/GY8VEQ95Y/darling-in-the-franxx
  • <span id="download-skip-specials">Skip specials</span>

    If you doesn't want to download special episodes, use the --skip-specials flag to skip the download of them.

    $ crunchy-cli download --skip-specials https://www.crunchyroll.com/series/GYZJ43JMR/that-time-i-got-reincarnated-as-a-slime[S2]
  • <span id="download-include-chapters">Include chapters</span>

    Crunchyroll sometimes provide information about skippable events like the intro or credits. These information can be stored as chapters in the resulting video file via the --include-chapters flag.

    $ crunchy-cli download --include-chapters https://www.crunchyroll.com/watch/G0DUND0K2/the-journeys-end
  • <span id="download-yes">Yes</span>

    Sometimes different seasons have the same season number (e.g. Sword Art Online Alicization and Alicization War of Underworld are both marked as season 3), in such cases an interactive prompt is shown which needs user further user input to decide which season to download. The --yes flag suppresses this interactive prompt and just downloads all seasons.

    $ crunchy-cli download --yes https://www.crunchyroll.com/series/GR49G9VP6/sword-art-online

    If you've passed the -q / --quiet global flag, this flag is automatically set.

  • <span id="download-force-hardsub">Force hardsub</span>

    If you want to burn-in the subtitles, even if the output format/container supports soft-subs

编辑推荐精选

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

openai-agents-python

openai-agents-python

OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。

openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。

Hunyuan3D-2

Hunyuan3D-2

高分辨率纹理 3D 资产生成

Hunyuan3D-2 是腾讯开发的用于 3D 资产生成的强大工具,支持从文本描述、单张图片或多视角图片生成 3D 模型,具备快速形状生成能力,可生成带纹理的高质量 3D 模型,适用于多个领域,为 3D 创作提供了高效解决方案。

3FS

3FS

一个具备存储、管理和客户端操作等多种功能的分布式文件系统相关项目。

3FS 是一个功能强大的分布式文件系统项目,涵盖了存储引擎、元数据管理、客户端工具等多个模块。它支持多种文件操作,如创建文件和目录、设置布局等,同时具备高效的事件循环、节点选择和协程池管理等特性。适用于需要大规模数据存储和管理的场景,能够提高系统的性能和可靠性,是分布式存储领域的优质解决方案。

下拉加载更多