Last active
June 14, 2026 20:23
-
-
Save haron/f7934e47e7fd64c280fe0054e21e493a to your computer and use it in GitHub Desktop.
Download podcast from YouTube and remove ads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # bash unofficial strict mode: | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| [[ -n ${DEBUG:-""} ]] && set -x | |
| [[ -z "$*" ]] && { echo "Usage: $0 playlist-url ..." >&2; exit 1; } | |
| for PLAYLIST; do | |
| yt-dlp \ | |
| -x \ | |
| --audio-format aac \ | |
| --audio-quality 64k \ | |
| --postprocessor-args "ExtractAudio:-ac 1" \ | |
| --download-archive archive.db \ | |
| --cookies-from-browser safari \ | |
| --js-runtimes node \ | |
| --remote-components ejs:github \ | |
| --min-sleep-interval 1 \ | |
| --max-sleep-interval 5 \ | |
| --limit-rate 2M \ | |
| --sponsorblock-remove all \ | |
| --replace-in-metadata title "^\d+ - " "" \ | |
| -o "%(playlist_title)s/%(playlist_index)02d %(title)s.%(ext)s" \ | |
| $PLAYLIST | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment