- Python 3.x
- google-api-python-client library
- pytube library
- playsound library
Install the required Python libraries using pip:
pip install google-api-python-client pytube playsound
- Obtain a YouTube Data API key from the Google Developers Console.
- Set up the YouTube Data API by enabling it for your project and creating an API key.
- Run the script
main.py
using Python. - Enter the name of the song you want to download. Make sure to include the artist's name for better search results.
- The script will search for the song on YouTube, download its audio, save it to a 'music' folder, and play it using the playsound library.
- You will be prompted to add the downloaded song to a playlist.
- Searches for songs on YouTube using the YouTube Data API.
- Downloads the audio of the selected song.
- Saves downloaded songs to a 'music' folder.
- Adds songs to a playlist in a CSV file.
- Plays downloaded songs using the playsound library.
- The script requires a stable internet connection to search and download songs from YouTube.
- Ensure that you have sufficient disk space for storing downloaded music files.
This script was developed by Partha Sarathi Dey.
This project is licensed under the MIT License.