Plan
Premium
Country
India
Device
HP Omen
Operating System
Windows 11
My Question or Issue
So I recently started using Spotify's API through Spotipy library in Python for a school project.
The objective of our project is to analyze the songs in Billboard HOT 100 since 1960.
I got the data for all the Billboard songs and wrote a code to get the Spotify URIs for all these songs using Search query provided by the API using Spotipy.
I am getting a Spotify Exception with HTTP Status: 400, Code: -1, for the following line of code,
sp.search(q="track: A Rockin' Good Way (To Mess Around and Fall in Love) artist: Dinah Washington & Brook Benton year: 1960",type='track')
Here, sp is the Spotify client.
I assumed this had something to do with the string quotes or the ampersand (&) but it doesn't seem to be the case because I have tried all possible combinations.
I would like to know how to deal with this.
Thank you.