All Projects → JayChen35 → spotify-to-mp3-python

JayChen35 / spotify-to-mp3-python

Licence: other
The simplest way to convert/download your Spotify playlist into MP3 files, using Python 3.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to spotify-to-mp3-python

muse
🎧 a self-hosted midwestern Discord music bot that doesn't suck
Stars: ✭ 354 (+306.9%)
Mutual labels:  spotify
react-spotify-player
Realtime Spotify Player built with React.
Stars: ✭ 126 (+44.83%)
Mutual labels:  spotify
MusicPlayer
A Telegram Music Bot written in Python using Pyrogram and Py-Tgcalls. This is Also The Source Code of The UserBot Which is Playing Music in @S1-BOTS Support Group ❤️
Stars: ✭ 218 (+150.57%)
Mutual labels:  spotify
cspot
A Spotify Connect player targeting, but not limited to embedded devices (ESP32).
Stars: ✭ 262 (+201.15%)
Mutual labels:  spotify
spicetify
🎨 Omni for Spicetify
Stars: ✭ 111 (+27.59%)
Mutual labels:  spotify
spotty
Spotify web clone build with Vue.js and Vuetify
Stars: ✭ 22 (-74.71%)
Mutual labels:  spotify
foo spotify
foobar2000 component for Spotify integration
Stars: ✭ 158 (+81.61%)
Mutual labels:  spotify
xspfy
Import XSPF playlists to Spotify.
Stars: ✭ 29 (-66.67%)
Mutual labels:  spotify
mixmello
Create remixed versions of your favourite Spotify playlists.
Stars: ✭ 38 (-56.32%)
Mutual labels:  spotify
yandex2spotify
Simple Python script that allow to import music from Yandex.Music to Spotify
Stars: ✭ 101 (+16.09%)
Mutual labels:  spotify
spotilink
Parse Spotify URLs into Lavalink track objects.
Stars: ✭ 22 (-74.71%)
Mutual labels:  spotify
radiopush
Create communities and share songs with Spotify users (https://radiopush.app)
Stars: ✭ 89 (+2.3%)
Mutual labels:  spotify
tailwind-spotify
Spotify UI built using TailwindCSS and VueJS
Stars: ✭ 36 (-58.62%)
Mutual labels:  spotify
spotify-rise
⏰ Spotify alarm clock for Ubuntu Linux
Stars: ✭ 32 (-63.22%)
Mutual labels:  spotify
spotify-control-rust
A simple CLI to control Spotify via D-bus
Stars: ✭ 15 (-82.76%)
Mutual labels:  spotify
paystack-music-api
The bot and API that powers Paystack Music.
Stars: ✭ 70 (-19.54%)
Mutual labels:  spotify
spicetify-extensions
extensions for spotify i'm creating
Stars: ✭ 207 (+137.93%)
Mutual labels:  spotify
aw-watcher-spotify
Logs what you listen to on Spotify
Stars: ✭ 41 (-52.87%)
Mutual labels:  spotify
spotify-reverse-playlist
This Linux bash script reverses the tracks in a playlist. It creates a new playlist with all tracks reversed.
Stars: ✭ 29 (-66.67%)
Mutual labels:  spotify
Spotify-Telegram-Bio-Updater
Spotify Telegram Bio Updater Heroku Integration
Stars: ✭ 26 (-70.11%)
Mutual labels:  spotify

Spotify to MP3 - Python

The simplest way to convert/download your Spotify playlist into MP3 files, using Python 3.

How To Use

This code is meant to be as simple and easy-to-use as possible. Despite this, there are some setup and usage steps (such as installing necessary packages) that are necessary for this code to work. Please read this section carefully.

1. Clone the respository

To clone this repoistory using Git, use

git clone https://github.com/JayChen35/spotify-to-mp3-python.git

If you aren't familiar with Git, navigate to the top-left of this page and find the green button labeled "Clone or download". Clicking this and then click "Download ZIP". Extract the contents of the downloaded .zip file.

Open a terminal session and navigate to this folder, using cd.

cd spotify-to-mp3-python/

2. Installing dependencies

We will be installing dependencies using pip, the official Python package manager. If you do not have pip, I'd recommend checking this thread to install it.

Copy and paste (and run) the following line in your terminal session to install all necessary packages.

pip3 install spotipy && pip3 install youtube_dl && pip3 install youtube_search && pip3 install yt_dlp && pip3 install ffprobe && pip3 install ffmpeg

3. Setting up Spotify

Unfortunately, I could not find a workaround for this step - it seems like we're forced to go through the Spotify API to fetch information about playlists. But, it doesn't take long at all.

Go to the Spotify dashboard. Log in. Once at the Dashboard, click the green button labeled "Create App". Don't worry - you're not signing up for anything or commiting to something from Spotify. Here, it really doesn't matter what you put for "App name" and "App description". For me, I just put "Testing" for both. Make sure to check both agreement boxes and click "Create".

You should see this:

Spotify App Screen

You will see the "Client ID" field on the left (it's redacted here). Copy and save your Client ID somewhere - you'll need it later. Click "Show client secret" under Client ID and it should show you another long list of characters. Also copy and save your Client Secret.

Next, we need your playlist URI. To do this, simply open Spotify, right-click on the playlist you want to download, hover over "Share", and click "Copy Spotify URI". It should look something like this: spotify:playlist:37i9dQZEVXbJiZcmkrIHGU. When inputting this into the script, make sure to only input the characters after "spotify:playlist:". So for this example, input 37i9dQZEVXbJiZcmkrIHGU. Save your URI somewhere handy.

4. Running

Running this script is straightforward. Simply run in your terminal session:

python3 spotify_to_mp3.py

If you run into an error saying something like "ffprobe or avprobe not found", check out this solution.

If all goes well, you should see your playlist beginning to download in a folder with the same name. Enjoy!

Modifications

If you don't like inputting your Client ID, Client Secret, Username, and URI every time, you can edit lines 96-99 in spotify_to_mp3.py to set the respective variables into a string containing your credentials instead of prompting with input(). For example, line 98 would become

username = "YourUserName"

Debugging

This script was made in the better part of an afternoon and so it's not, by far, bug-free. Personally, I've run into no problems using this script on any of my playlists, however, your mileage may vary. The most promenant bug I've run into involves the youtube-search package not consistantly turning up results, and most of the time, the best solution is to simply try running the script again and giving it more chances to get the search right.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].