It's not that I'm so smart, it's just that I stay with problems longer. - A. Einstein
We bet this one's going to be music to your ears (another quality pun!).
This week, query the Spotify API and write some code that performs the set of tasks we've listed below.
If you have another music service you'd rather use, feel free!
Now for the challenge tasks:
Query Spotify and grab a list of album names for any given artist. Bonus points if the script allows the user to specify the artist!
Create a playlist on your account if you don't already have one. Write a script that queries Spotify for the playlist and returns all tracks/songs in the playlist.
This one's tricky: write a script that obtains a list of the top tracks for an artist and see if any of those songs exist in your playlist.
Feel free to dig into the API and go wild!
If you don't have an existing playlist, just create one with random artists and use it as your data set.
Hint: Check out the Spotipy Python Library to make this a little easier on yourself.
If you need help getting ready with Github, see our new instruction video.
A few more things before we take off:
Do you want to discuss this challenge and share your Pythonic journey with other passionate Pythonistas? Confirm your email on our platform then request access to our Slack via settings.
>>> from pybites import Bob, Julian Keep Calm and Code in Python!
See an error in this post? Please submit a pull request on Github.