A simple script in python which is using youtube-dl to download the songs from youtube.
-
Make sure you have the python environment setup on your system.
-
Run the following in the directory containing the script files.
pip install -r requirements.txt
-
Make sure you have ffmpeg installed on your system. It will get used by youtube-dl to convert any downloaded audio file to
mp3
. -
Get you api key for YT Data API v3 and put it in the
config.py
file inplace ofYOUR_API
. This is being used to query youtube's database'.
You are good to go...
Just run the following command:
python download_yt.py
Enter the name of artist / song you want to download. The mp3 for that will be downloaded in the present directory itself.