Skip to content

Bulk Downloading Liked Songs from YouTube

TL;DR ✨

Have you also thought it would be useful to have a tool that, with one click, downloads as MP3 every song on YouTube that you have marked as “liked” or “favorite”?

One option is to click through song after song like a trained monkey using any number of GUI tools, such as https://www.onlinevideoconverter.com/. The other is simply to reach for a tool called youtube-dl, which has been thoroughly tested by the Linux community.

From the archive

This article was first published on 2017-06-11. It is also a snapshot of its time, so some details and recommendations may no longer reflect the current situation.

Have you also thought it would be useful to have a tool that, with one click, downloads as MP3 every song on YouTube that you have marked as “liked” or “favorite”?

One option is to click through song after song like a trained monkey using any number of GUI tools, such as https://www.onlinevideoconverter.com/. The other is simply to reach for a tool called youtube-dl, which has been thoroughly tested by the Linux community.

The following procedure shows exactly how to download all of those favorite songs.

  1. The author logs in to YouTube and opens the section containing the videos he has liked. Opening it reveals the URL of that playlist.

Youtube-Playlist

✨ The URL needed later is visible at the top

In the terminal, install youtube-dl with this simple command:

sudo apt-get install youtube-dl

On the command line, create a directory where everything will be downloaded:

cd ~/Music

mkdir youtube01-149

cd youtube01-149/

Now run youtube-dl with the following parameters:

youtube-dl -i -x --audio-format mp3 --playlist-start 1 --playlist-end 149 https://www.youtube.com/playlist?list=LL_RyfGcPzlnP2HKWccccv7g --username VasLoginDoYoutube@gmail.com

The command contains the following options:

  1. -i tells the tool to ignore songs that produce an error. Ordinarily, downloads run sequentially from video 1 through video 149; if the downloader encounters an error, the entire download stops, which is not desirable here.
  2. -x --audio-format mp3 says to turn the YouTube videos into MP3 files.
  3. --playlist-start X and --playlist-end Y specify which numbered video to start with and which one to end with. Why use this parameter? Imagine having 2,500 songs to download. It is better to divide the job into several smaller parts with this option, thereby speeding up the bulk download.
  4. --username is a required parameter because liked videos are not publicly available to everyone. The downloader therefore has to authenticate with a YouTube login and then a password.

If everything has been entered correctly, the playlists can now be downloaded successfully for offline listening.

Youtube-dl can do a great deal more. If the download needs to be adjusted in various ways, searching the web will turn up guides, tips, and tricks. Youtube-dl really has been extensively tried and tested by the Linux community.

Windows users need not despair. Guides are also available for running youtube-dl on Windows. Detailed instructions can be found on YouTube: https://www.youtube.com/watch?v=DW5jfjN-5RI

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Update 05.03.2018

After downloading youtube-dl and trying to download tracks, the author encountered this error: [youtube:playlist] PL8B24C31197EC371C: Downloading page #1 ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>

After a little searching, the solution was as follows:

✨ 📱 What should have been done:

Either of these commands should have been used:

either

sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

or

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

The author used the first one, after which it worked correctly.