I'm trying to download an entire Youtube channel and that worked.
But I'm having the directories' names like below and thus I need to change that all manually.
I need a way to pass channel / playlist name and id to the script instead of fetching the url.
Script I used :
# get working/beginning directory
l=$(pwd);
clear;
# get playlists data from channel list
youtube-dl -j --flat-playlist \
  "https://www.youtube.com/channel/UC-QDfvrRIDB6F0bIO4I4HkQ/playlists" \
  |cut -d ' ' -f4 \
  |cut -c 2-73 \
  |while IFS= read -r line;
  do;
    # loop: do with every playlist link
    # make a directory named by the playlist identifier in url
    mkdir ${line:38:80};
    # change directory to new directory
    cd $l/${line:38:80};
    # download playlist
    youtube-dl -f mp4 "$line";
    # print playlist absolute dir to user
    pwd;
    # change directory to beginning directory
    cd $l;
  done;
Names of directories :
.
├── PLxl69kCRkiI0oIqgQW3gWjDfI-e7ooTUF
├── PLxl69kCRkiI0q0Ib8lm3ZJsG3HltLQDuQ
├── PLxl69kCRkiI1Ebm-yvZyUKnfoi6VVNdQ7
├── ...
└── PLxl69kCRkiI3u-k02uTpu7z4wzYLOE3sq
This is not working :
- https://github.com/ytdl-org/youtube-dl/issues/23442 - # any playlist is seen as private youtube-dl -J \ https://m.youtube.com/playlist?list=PL3GeP3YLZn5jOiHM8Js1_S0p_5HeS7TbY \ | jq -r '.title'
- How to use youtube-dl from a python program? - I need it for bash script not for python 
Edit: simply explained
How to get channel name from bash youtube-dl and replace it with list id for file name in this script
 
    