Skip to content

Instantly share code, notes, and snippets.

@pavelpy
Created March 21, 2019 13:20
Show Gist options
  • Save pavelpy/44bab009ebe748c12d19f537145cd80b to your computer and use it in GitHub Desktop.
Save pavelpy/44bab009ebe748c12d19f537145cd80b to your computer and use it in GitHub Desktop.
Download youtube channel
#!/bin/bash
./youtube-dl --download-archive downloaded.txt -i -o "%(uploader)s/%(upload_date)s - %(title)s - (%(duration)ss) [%(resolution)s].%(ext)s" -f bestvideo[ext=mp4]+bestaudio --batch-file=channel_list.txt
# or
# usage: youtube_channel_download.sh videourl
LOGFILE="$PWD/$(date +"%Y-%m-%d-%H-%M-%S.%N").log"
exec 3>&1 4>&2 >>$LOGFILE 2>&1
youtube-dl --verbose --ignore-errors --no-continue --no-overwrites --keep-video --no-post-overwrites --download-archive archive.txt --write-description --write-info-json --write-annotations --write-thumbnail --all-subs --output "%(uploader)s (%(uploader_id)s)/%(id)s/%(title)s - %(upload_date)s.%(ext)s" -f bestvideo[ext=mp4]+bestaudio[ext=m4a] -- $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment