We were lucky enough to get Glastonbury tickets again this year. Being Glastonbury, there are plenty of artists I know well – but there are also plenty I don’t. I decided to do the standard thing and try listening to the other artists on the line-up using Spotify.
What I needed was to get the top tracks of each artist into a playlist. After googling and finding this doesn’t exist already, I realised I’d have to make it myself. Fortunately Spotify has a very good API – and someone has already made a very nice Python library, spotipy, to use it.
Click the iPython Notebook icon below to take a look at the code: