Download YouTube Music Playlist for FREE! No Website Required

Опубликовано: 02 Декабрь 2024
на канале: Michael Kakam
683
8

Hope you enjoyed the video!
Don't forget to like/dislike and subscribe!
Leave comments if you have any questions and want clarification.

Link to previous video:    • Download YouTube Music In One Command...  

There are some cuts in the video during downloading songs. This is because it sometimes longer for the song to download due to my internet and I wanted to save you some watch time. The method does actually work as shown at the start.


Timestamps:
------------------------
0:00 Intro and what are are making
0:59 Setting up YouTube playlist downloads
2:22 Playlist Download Example
2:50 Creating script which downloads many YouTube links
3:40 Getting bookmarked videos from Mozilla Firefox
4:12 Getting bookmarked videos from Google Chrome
4:42 Reformatting the list of links
6:27 Pasting links into script
6:48 Running the script
8:01 Outro

Commands/Scripts/Explanations/Links:
------------------------------------------------------------------
Editing the aliases.cmd file at 1:09 - Just add a '-i' as so :
[
@echo off
doskey yt_mp3=python -m yt_dlp -x --audio-quality 0 -i -o "LOCATION OF FOLDER YOU WANT TO DOWNLOAD MUSIC TO\%%(title)s.mp3" $*
]
Explanation in video.
Downloading all songs from a playlist at 2:22 - [ yt_mp3 PLAYLIST_URL ]
Website at 4:06, 4:34, 5:03 - https://pinetools.com/find-and-replace
Creating the script at 3:23 (note that what is here is different to what you see in video; this is better) -
[
import os
urls = [

]
for url in urls:
os.system('python -m yt_dlp -x --audio-quality 0 -o "C:/Users/M/Music/%(title)s.mp3" ' + '"' + url + '"')
]
'import os' - imports the 'os' module into python which allows us to do things like call cmd commands through python
'urls = [ ]' - create and empty list called 'urls'
'for url in urls' - iterate over all of the items in the 'urls' list, naming each 'url' in turn;
'os.system('python -m yt_dlp -x --audio-quality 0 -i -o "C:/Users/M/Music/%(title)s.mp3" ' + '"' + url + '"')' - with that url, call our download command.
running the bookmark downloading script at 7:09 - [ python mass_download.py ]

For all of the commands above, we could have also used 'youtube_dl' in palce of 'yt_dlp' (if that's what we used in the previous video), however I found that the latter has faster download speeds.
In the description of the last video I said that it doesn't matter whether we use backslashes (\) or forward slashes (/) for paths. However, when it comes to Python, it does matter. A backslash is a special character which 'escapes' the character after it. The forward slash is not a special character, and so we use a forward slash in our strings instead.