This script allows you to convert Spotify playlists to .m3u8 format. It assumes that the music files are stored locally on your computer.
-
Clone this repository:
git clone https://github.com/MichelleAppel/SpotifyToM3U8
-
Enter the directory:
cd SpotifyToM3U8
-
Install the required Python packages:
pip install -r requirements.txt
-
Obtain your Spotify client ID and client secret. You can do this by creating a new app on the Spotify Developer Dashboard and copying the values from there.
-
Create a
.env
file in the root of the project directory, and add your Spotify client ID and client secret as follows:SPOTIFY_CLIENT_ID=<Your Spotify Client ID> SPOTIFY_CLIENT_SECRET=<Your Spotify Client Secret>
-
Run the script:
python main.py <Spotify playlist URL> <Path to local music folder> <Output directory>
For example:
python main.py "https://open.spotify.com/playlist/7AUYU0uw5U4Y1OhLgztJQV?si=dc9cd9a71f714516" "C:/path/to/your/music/" "./output/"
If you encounter any issues while using this script, please open an issue on this repository.
This project is licensed under the MIT License. See the LICENSE file for details.