Last active
March 9, 2023 12:14
-
-
Save ljmccarthy/da3e784a1d2bbf0c9cf4f867053f1083 to your computer and use it in GitHub Desktop.
YouTube-DL archiving script
This file contains 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
#!/bin/sh | |
download_videos() { | |
yt-dlp --download-archive archive -ciw -o "%(upload_date)s %(id)s %(title)s.%(ext)s" -v "$@" | |
} | |
find . -type d | while read dir; do | |
if [ -f "$dir/url" ]; then | |
(cd "$dir" && download_videos "$(cat url)") | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment