Spotify Liked To Playlist is a Python application that automates the process of organizing your Spotify liked songs by adding them to a specific playlist. This tool allows you to gather all your liked songs in one place, avoiding duplicates and keeping your library clean by unliking the songs after they've been added to the playlist.
- Automatically creates a playlist if it doesn’t exist or adds songs to an existing one.
- Checks for duplicates to avoid adding the same song multiple times.
- Unlikes songs after they’ve been added to the specified playlist.
- Simple and user-friendly output indicating the status of each song added.
To run this application, you'll need:
- Python 3.x installed on your system.
- A Spotify account (free or premium).
- An application registered on the Spotify Developer Dashboard to obtain your API credentials.
-
Clone the repository:
git clone https://github.com/yourusername/spotify-liked-to-playlist.git cd spotify-liked-to-playlist
-
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the project directory and add your Spotify API credentials:SPOTIPY_CLIENT_ID='your_spotify_client_id' SPOTIPY_CLIENT_SECRET='your_spotify_client_secret' SPOTIPY_REDIRECT_URI='http://localhost:8888/callback'
-
Modify the
playlist_name
variable in the script to the desired playlist name where liked songs will be stored. -
Run the script:
python spotify_liked_to_playlist.py
-
Complete the authentication process in your browser to authorize the app with your Spotify account.
- This application works with all songs in your liked songs library.
- Ensure an active internet connection to add songs to Spotify.
This project is licensed under the MIT License. See the LICENSE file for details.
- Spotipy - A Python library for the Spotify Web API.