youtube-dl; How download ONLY the playlist, NOT the files therein

Did u read the page wysiwig suggested in his comment? (thanks @wysiwig!)

List Youtube playlist with youtube-dl

Anyway, here I'll try to explain what you could do (extracted from the previous web site)

Try using this command:

youtube-dl -j --flat-playlist "https://<yourYoutubePlaylist>" | jq -r '.id' | sed 's_^_https://youtu.be/_' > result.log

This will produce an output similar to this in result.log:

https://youtu.be/0gvUCLL-UGE
https://youtu.be/CPV7zcUy4J0
https://youtu.be/4wyZNwIrH9I
...

which should be what you need (a list of discrete links to YT videos).

Command explanation With the -j option youtube-dl will produce a JSON output which contains all the information about the link you pass (a playlist in this case).

This JSON output is then passed to jq JSON processor (you have to install it before see JQ website) searching for all the "id" keys contained in the JSON output (0gvUCLL-UGE,CPV7zcUy4J0,4wyZNwIrH9I,...). We then pass those "id"s to sed which will prefix each of them with https://youtu.be/ giving the result I shown before.

Note 1:To install JQ you can simply use: sudo apt-get install jq

Note 2:This approach works for Youtube only.


@wysiwig's method does produce output on linux, but not what I sought, thus :

$ youtube-dl --flat-playlist --skip-download https://www.youtube.com/playlist?list=PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr  

Output :

[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading webpage
[download] Downloading playlist: Full Length Arthouse Movies
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #1
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #2
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #3
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #4
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #5
[youtube:playlist] PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr: Downloading page #6
[youtube:playlist] playlist Full Length Arthouse Movies: Downloading 636 videos
[download] Downloading video 1 of 636
[download] Downloading video 2 of 636
[download] Downloading video 3 of 636
...

What I really wanted to get from the playlist are the the video-names, so that I could pick out only those I want to download, which I get with :

$ youtube-dl -i --get-filename --skip-download https://www.youtube.com/playlist?list=PLm9l7EEbJuhyDYNuItj3sG8h3xAZbjIxr  

Output :

The Waiters (full length MOVIE, entire feature film, full film) _watch full movies for free-CNotezuR73g.mp4
Malcolm X (MORGAN FREEMAN, Full Movie, Englisch, Film in Full Length) _watch full movies for free-3C8j1C7HMj8.mp4
The Arizona Kid - Western, Full Movie, Full Length Feature Film starring ROY ROGERS, Classic Movies-8McZ6G2Uud8.mp4
Desperado Man aka Sagebrush Trail (Western Movie, Full Length Movie, Feature Film, Classic Movie)-7udmB5M6IIE.mp4
...