Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- DOWNLOADER="yt-dlp"
- if [ "$#" = "0" ]; then
- echo "Missing argument! Use $0 --help to show available options!"
- exit 1
- fi
- if [ "$1" = "--help" ]; then
- printf "Script will output content for archive file for usage with youtube-dl --archive-file\n"
- printf "Valid as it stands on 29.06.2021.\n\n"
- printf "Available switches:\n $0 --channel -provide youtube channel address\n"
- exit 0
- fi
- command -v jq >/dev/null 2>&1 || {
- echo "I require jq but it's not installed. Aborting." >&2
- exit 1
- }
- command -v $DOWNLOADER >/dev/null 2>&1 || {
- echo "I require $DOWNLOADER but it's not installed. Aborting." >&2
- exit 1
- }
- # enter youtube channel
- #CHANNEL="https://www.youtube.com/user/rossmanngroup/videos"
- #
- $DOWNLOADER --flat-playlist -j "$1" | jq -r '.id' | awk '{print "youtube "$0}'
Advertisement
Add Comment
Please, Sign In to add comment