A Python script to update Spotify Playlist data every 5 minutes.

Overview

Spotify Playlist Updater

A Python script to update Spotify Playlist data every 5 minutes.

Description

An automatic playlist updater using Spotify API and Authorization code flow in Python to update a Playlist on a repeating time interval.

Getting Started

You will need Python to execute the script:

Spotify Playlist Updater requires three dependencies:

Pip
  • A Package Management System for Python.
  • Installation Link
  • For Windows, you can run py -m ensurepip --upgrade in CMD to install.
Schedule
  • Python job scheduler to run the script on a timer.
  • Installation Link
  • For Windows, you can run -m pip install schedule --upgrade in CMD to install.
A Web Domain
  • No website required, only a web domain for redirecting the API request and retrieving the user authorization token.
  • If you don't already own a domain, you can create one at https//wix.com
Spotipy
  • Python library for the Spotify Web API
  • Installation Link
  • For Windows, you can run py -m pip install spotipy --upgrade in CMD to install.

Set Up

Installing the Script
  • Install the dependencies listed above.
  • Choose a location on your device (I'll refer to this as the working directory)
  • Download the latest release of spotify-playlist-updater to the working directory.
  • Save your playlist photo (if applicable) in the data folder of the working directory
Set up Client ID, Client Secret and Redirect URI
  • Login to Spotify Developer Account
    • Go to https://developer.spotify.com/dashboard/ and click Manage Dashboard.
    • Then, sign in with your Spotify credentials and accept the latest Developer terms of service.
    • Note your Client ID, and Client Secret.
  • Create an App
    • In the Developer Dashboard, create an App. You can put whatever you'd like for the App name and description.
    • Click Edit Settings.
      • Add your domain address to the Redirected URI's field, and click Add. Make sure to Save.
Adding your Playlist information
  • Right click \spotify-playlist-updater.py from the working directory, and select "Edit with IDLE"
    • Put your Playlist Image path in place of: "C:\\Users\\You\\YourWorkingDirectory\\Data\\PlaylistPhoto.jpeg"
    • Put your Spotify Username in place of: 'username'
    • Put your Client ID in place of 'clientid'
    • Put your Client Secret in place of 'clientsecret'
    • Put your Web Domain Address in place of 'http://yourdomain.com'
    • Put your Spotify Playlist Link in place of 'https://open.spotify.com/playlist/yourplaylist'
    • Put your Playlist Description in place of 'Playlist Name'
    • Put your Playlist Description in place of 'Playlist Description'
  • Save the script once your changes are made.

Running the Script

  • Right click spotify-playlist-updater.py and Open.
  • The script updates the Playlist every 5 minutes. You can adjust the update frequency by changing the number value for schedule.every(5).minutes.do(func)
  • The script will restart if it runs into a timeout to prevent it from failing during an internet hiccup.
    • If you have an unstable internet connection and run into issues, try removing the continue statement.

Thank you

If you enjoyed my project, please feel free to leave tips on my Ko-Fi. https://ko-fi.com/autumntillman or Paypal.

Help

  • If you get an error that "Read timed out. (read timeout=5)", restart the script.
  • If your script doesnt get past "Starting Playlist Updater", run the script using IDLE:
    • Right click spotify-playlist-updater and click Edit with IDLE
    • Click F5 to run the script
      • Let the script run. Any errors will be listed as the script encounters them.

To report issues, create a new issue on Github or email [email protected]

Authors

Aeriie on GitHub

Version History

  • 0.1
    • Initial Release
You might also like...
Spotify Top Lists - get the current top lists of a user from the Spotify API and display them in a Flask app
Spotify Top Lists - get the current top lists of a user from the Spotify API and display them in a Flask app

Spotify Top Lists This is a simple script that will get the current top lists of a user from the Spotify API and display them in a Flask app. Requirem

A script to generate the m3u playlist containing direct streamable file (.mpd or MPEG-DASH or DASH) based on the channels that the user has subscribed on the Tata Sky portal. You just have to login using your password or otp that's it . A Discord Server Cloner Which Can Clone Any Discord Server In Just Few Minutes
A Discord Server Cloner Which Can Clone Any Discord Server In Just Few Minutes

A Discord Server Cloner Which Can Clone Any Discord Server In Just Few Minutes.

Python script to backup/convert your Spotify playlists into the XSPF format.

Python script to backup/convert your Spotify playlists into the XSPF format.

Script for polybar to display and control media(not only Spotify) using DBus.
Script for polybar to display and control media(not only Spotify) using DBus.

polybar-now-playing Script for polybar to display and control media(not only Spotify) using DBus Python script to display and control current playing

A script to automatically update bot status at GitHub as well as in Telegram channel.

Support BotStatus ~ A simple & short repository to show your bot's status in your GitHub README.md file as well as in you channel. ⚠️ This repo should

A script that takes what you're listening too on Spotify and sets it as your Nertivia custom status.

nertivia-spotify-listening-status A script that takes what you're listening too on Spotify and sets it as your Nertivia custom status. setup Install r

Requests based multi-threaded script for increasing followers on Spotify
Requests based multi-threaded script for increasing followers on Spotify

Proxyless Spotify Follow Bot Requests based multi-threaded script for increasing followers on Spotify. Click here to report bugs. Usage Download ZIP h

Comments
  • Enter the URL you were redirected to

    Enter the URL you were redirected to

    Hey! Got a problem. When running a code I'm getting this: Starting Playlist updater Enter the URL you were redirected to:

    It redirects to https://vladprokopov26.wixsite.com/spotifyapi?code=AQCBrGH_MQAc2TsyNIQiXRtD1k7rGGSkLlxQFFWNoQ0_GtHt6DPCGvIgYGcyO9lTWB1xjzGrgPyDd3tKCB85xsHHHf_G3DnZWNOJ5d7Z_SZ2FajUgQ_yivneLKwsU4Ssu68YDrnX_CysKf_cHko-HDfBfiFaXasPXYlrPE8hvzGuWteFwXD1RrdXK_mZGj0_IJWMFgKmvoKH8EZ3phmKDgYzemYtCarFc07z_ADlCLy9VKxCNaez37q58w

    If I put it, it returns the error: traceback.txt

    If I run again and put my WIX Site (https://vladprokopov26.wixsite.com/spotifyapi) here, it asks again: Enter the URL you were redirected to:

    If I put my WIX Site here again, it returns absolutely the same error.

    It asks for redirected URL twice. If I put anything that doesn't equals redirect_uri which is https://vladprokopov26.wixsite.com/spotifyapi, it returns same error.

    If I just press Enter two times it returns the same error...

    Not sure what the problem is. I'm authorized in Spotify with my name, the client it and secret are right. I checked everything. Installed everything stated.

    Mine script derictory: C:\Users\Aberdin\SpotifyAPI\Playlist Script

    opened by Illuwn 0
  • Help with the Spotify app! :)

    Help with the Spotify app! :)

    Hey Aeriie,

    I landed here from Spotify Community. I'm a Spotify user who's having trouble with his playlists being reported. I tried to do everything you said on to guide to set up the Playlist Updater but I'm absolutely no expert in coding and I probably did something wrong because the program is not working. How can we get in contact so I can ask you some fast questions in order to solve my issues? Thank you!

    opened by arilefff 0
  • I need help :/

    I need help :/

    Hi Aeriie,

    I got sent your spotify playlist updater because I really have been struggling with bots. Every time I update my playlist, 5 min goes by and my name, cover and description is removed from the playlist. It is really sad as it is growing a lot in followers recently. The thing is.. I could really use your help, getting the code installed and activated. I have tried your tutorial but I really don't have the skills for it. Also I don't even know what the program is or what it does. Can you somehow help me? I really want my playlist to work... I was thinking maybe if you had 5-10 min, we could chat over discord. If you want payment I don't blame you

    Lucas.

    opened by Lukour 0
Owner
null
SpotPlay2YouPlay - Converts new additions to a Spotify playlist to a matching Youtube playlist

SpotPlay2YouPlay - Converts new additions to a Spotify playlist to a matching Youtube playlist, can also be configured to converting whole playlists with the refresh fun

null 9 Mar 6, 2022
A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

Youngseo Park 1 Feb 1, 2022
Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & runs for 24x7 hours.

PowerfulBotStatus-IDN-C-X Easy & powerful bot to check if your all Telegram bots are working or not. This bot status bot updates every 45 minutes & ru

IDNCoderX 5 Oct 6, 2022
JAKYM, Just Another Konsole YouTube-Music. A command line based Youtube music player written in Python with spotify and youtube playlist support

Just Another Konsole YouTube-Music Overview I wanted to create this application so that I could use the command line to play music easily. I often pla

Mayank Jha 73 Jan 1, 2023
An interactive App to play with Spotify data, both from the Spotify Web API and from CSV datasets.

An interactive App to play with Spotify data, both from the Spotify Web API and from CSV datasets.

Caio Lang 3 Jan 24, 2022
Web app for spotify playlist management with last.fm integration

Music Tools Set of utility tools for Spotify and Last.fm. Built on my other libraries for Spotify (spotframework), Last.fm (fmframework) and interfaci

andy 3 Dec 14, 2022
Converts a text file of songs to a playlist on your Spotify account.

Playlist Converter Convert a text file of songs to a playlist on your Spotify account. Create your playlists faster instead of manually searching for

Priya Aggarwal 18 Dec 21, 2022
A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

David .K. Danso 1 Jan 17, 2022
Spotify playlist anonymizer.

Spotify heavily personalizes auto-generated playlists like Song Radio based on the music you've listened to in the past. But sometimes you want to listen to Song Radio precisely to hear some fresh songs outside of your habitual listening realm!

Jakob de Maeyer 9 Nov 27, 2022
A really easy way to display your spotify listening status on spotify.

Spotify playing README A really easy way to display your spotify listening status on READMEs and Websites too! Demo Here's the embed from the site. Cu

Sunrit Jana 21 Nov 6, 2022