I Am the King of Rock and Roll

Behold …


I, king of the world, the greatest Python programmer in history, have succeed in the following. I wrote a script that does this wicked coolness using the Spotify API:

  1. Creates and opens an HTML file
  2. Inserts opening HTML, opening and closing HEAD tags, and opening BODY tag
  3. Takes an artist ID
  4. Gets that artist’s albums
    • For each album
      1. Puts the album title in H2 tags
      2. Inserts an opening OL tag
      3. Uses the album ID to get that album’s tracks
        • For each track
          • Puts the track name in LI tags
      4. Inserts a closing OL tag
  5. Inserts closing BODY and HTML tags
  6. Closes the HTML file

It looks like this …


If you would like autographed picture of me or some other token of my awesomeness, please leave a polite comment.

I am also now available for hire as your new Sr. Developer or Data Scientist.

Update: After getting the popularity for each album (below), I seem to have stalled.


I wanted to combine the two–have a list of albums showing their popularity and the songs showing their popularity but, for some reason, I can’t get my Python code to get the track objects containing the track popularity. I can do it if that function is it’s own thing but as soon as I make it part of a loop it won’t work anymore.

Another update: Eventually I decided to start over with JavaScript and jQuery.


About jotascript

Aiming to please. Seeking to impress.
This entry was posted in APIs, myProjects, Python, Spotify. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s