Skip to content

Instantly share code, notes, and snippets.

@zmwangx
Created November 5, 2014 19:11
Show Gist options
  • Save zmwangx/0245788475f963210ed9 to your computer and use it in GitHub Desktop.
Save zmwangx/0245788475f963210ed9 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