johnsu01 (johnsu01) wrote,
johnsu01
johnsu01

  • Music:

Five Songs

The meme from veganhothead was to name five songs that start with a random letter, and she gave me "S".

Instead of thinking for myself, I decided to write a quick script to look at my last.fm favorites feed and show me all the songs that start with S.

Except last.fm's feeds are only 50 songs deep, and in those 50 songs, there is only 1 that starts with S. So I had the script scrape the charts page instead.

So, in the end I did:

>>> from lastfm import *
>>> favList = TrackList()
>>> favorites = favList.list_by(key='title', pattern='^s')
>>> len(favorites)
48

48 songs is more like it. Here's 5:

Subdivisions, Rush
The drama never fades. You just don't understand. I first encountered this song in suburbia somewhere around the age of 14. It made me want to be in a band. I was in a band. But I never spent any time learning to actually play the music. I was more interested in cultivating my mullet and drawing demons to go on the official band t-shirts. Neither the music nor the t-shirts ever found their way out of the basement. I don't mean to belittle it. I still think it's a great song. Just be happy you never heard Nemesis do it.
Silent All These Years, Tori Amos
This was a couple years after Subdivisions, still in suburbia. I'm pretty sure it was MK who introduced me to Little Earthquakes. I was still pretending to play the piano (I guess I still do that), so there was some appeal there, plus the appeal of liking MK. I saved up and took KH to see Tori in concert. I remember having a good time but getting lost in downtown Detroit.
Slip Away, Clarence Carter
I requested this song often at the Green Door. Jerome could really sing it. In fact, I don't really like this Clarence Carter version that much. I just like it because it reminds me of Jerome and the ACME Jam Company. Someday I will find a better version of it. Unfortunately I will never hear them do it again.
Someday Never Comes, Creedence Clearwater Revival
"You better learn it fast \\ you better learn it young". I don't think I discovered CCR until college. It was in this song where I learned that "learn" is actually pronounced "loin" and that daddy "went away". Many fine memories are strangely tied up with this song. I'd still put it on a sunny road trip mix.
Straight, No Chaser, Miles Davis
This is the version from '58 Sessions Featuring Stella by Starlight, one of the first jazz albums I got hooked on, between college and grad school. I heard it before I ever heard Monk. Some people seem to think that this version (featuring Bill Evans, Paul Chambers, Jimmy Cobb, John Coltrane and Cannonball Adderley) is too fast, but it still sounds good to me. The piano is unfortunately muted because of problems with the recording quality, but you can hear enough.

If you want, I'll give you a letter.

#!/usr/bin/python

"""
Amateurishly scraping my last.fm charts
"""

CHART_URL = \
    'http://www.last.fm/user/johnsu01/charts/&charttype=overall&subtype=track'

import re

class Page(object):
    def __init__(self):
        from urllib import urlopen
        self.text = urlopen(CHART_URL).read()

class Chart(object):
    def __init__(self):
        from BeautifulSoup import BeautifulSoup, SoupStrainer
        chartLabels = SoupStrainer('td', { 'class' : 'chartlabel' })
        chartPage = Page().text
        soup = BeautifulSoup(chartPage, parseOnlyThese=chartLabels)
        self.entriesHTML = soup.findAll('a')

class TrackList(Chart):
    # This does not preserve ranking information, or number of plays
    def __init__(self):
        Chart.__init__(self)
        self.tracks = self.find_tracks()

    def find_tracks(self):
        tracks = []
        for t in self.entriesHTML:
            (artist, title) = t['title'].split(u' \u2013 ')
            tracks.append(dict(artist=artist, title=title))
        return tracks

    def print_all(self):
        for t in self.tracks:
            print "Artist: %(artist)s | Title: %(title)s\n" % t

    def list_by(self, key='artist', pattern='.'):
        # Makes no effort to uniquify the list
        filt = re.compile(pattern, re.IGNORECASE)
        res = []
        [res.append(t) for t in self.tracks if re.search(filt, t[key])]
        return res
Tags: creedence clearwater revival, jazz, meme, miles davis, music, tori amos
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments