Skip to content

Instantly share code, notes, and snippets.

@bumbummen99
Created April 28, 2023 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bumbummen99/f44a7f74e13399385efc8011fd1d392c to your computer and use it in GitHub Desktop.
Save bumbummen99/f44a7f74e13399385efc8011fd1d392c to your computer and use it in GitHub Desktop.
Small script to download from Crunchyroll using YouTube-DLP and browser cookies.
#!/usr/bin/env bash
# Configure the script
URL="$1"
BROWSER="$2"
SUBTITLES="${3:-de-DE}"
# Build up the command
CMD=()
# Add executable
CMD+=(youtube-dl)
# Download german subtitles
CMD+=(--write-sub)
CMD*=(--sub-lang $SUBTITLES)
# Use Crunchyroll account from browser cookies
CMD+=(--cookies-from-browser $BROWSER)
# Download the provided video
"${CMD[@]}" $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment