Skip to content

Instantly share code, notes, and snippets.

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 brandongalbraith/8829878f04abb940891fce7e0348e118 to your computer and use it in GitHub Desktop.
Save brandongalbraith/8829878f04abb940891fce7e0348e118 to your computer and use it in GitHub Desktop.
List video URIs in a YouTube playlist.
#!/usr/bin/env bash
# Takes a YouTube URI to a playlist (fairly liberal, it's fine as long
# as the playlist id can be extracted), and prints a list of URIs in a
# YouTube playlist.
#
# Requires youtube-dl 2014.10.24, tested on youtube-dl
# 2014.11.02.1. Feature subject to change.
youtube-dl -j --flat-playlist "$1" | jq -r '.id' | sed 's_^_https://youtube.com/v/_'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment