2

So I have a really large list of spotify songs (almost 50.000 rows). Each row contains a spotify song, specified by the name of the song and name of the artist. I need to print the track id's for each song in the previous file. I tried doing this for each row in the file

results = spotify.search(q='artist:' + artist + ' track:' + title, type='track')
trackId = results['tracks']['items'][0]['id']

This is way too slow. I believe the problem is that I do too many requests at the spotify servers. Is there any faster way to solve my problem? Thanks you very much

Sergi Funk
  • 21
  • 2
  • 1
    Ouch! this sounds like it's going to be a painful process! I presume once you are getting the spotify track id you're saving it for future use? You could maybe group your existing data by artist and make more 'fuzzy' calls to get a large group of tracks then match up in batches – scgough Apr 05 '19 at 10:39

0 Answers0