Simple Python script for automated creation of playlists in Spotify from a list of tracks.
The createPlaylistSpotify
script is designed to automate the process of creating playlists in Spotify. It reads a list of tracks from a file and uses the Spotify API to search for each track and add it to a playlist.
- Reads a list of tracks from a file in the format "artist - track name".
- Authenticates with the Spotify API using the
spotipy
library. - Searches for each track using the Spotify API and adds it to a playlist.
- Easy-to-use and customizable.
- Python 3.x
- spotipy library (install using
pip install spotipy
)
-
Clone this repository:
git clone https://github.com/urgarth/createPlaylistSpotify.git cd createPlaylistSpotify
-
Create a file named track_list.txt in the same directory with your list of tracks in the format "artist - track name". Or you can change exist file.
-
Obtain your Spotify API credentials from the Spotify Developer Dashboard. Click "Create app" button, and fill the same:
-
Update the client_id, client_secret, and redirect_uri values in the script with your Spotify API credentials.
-
Run the script:
python create_playlist.py
Follow the prompts to authenticate with your Spotify account and create the playlist.