Last.fm musical taste overlap

I have written a short Python script to allow you to find the overlap between the favourite artists of two user’s on Last.fm.

For example, my Last.fm favourites compared to my friend Seb’s favourites currently produces this list.

swp1@flemensfirth:~/src/python/lastfm-intersect$ python pair.py Aimaz cybersebb
In Flames
Pantera
Black Sabbath
Led Zeppelin
Dead Kennedys
Opeth
Beastie Boys
Anathema
Pink Floyd
Queens of the Stone Age
Iced Earth
Rage Against the Machine
Metallica
My Dying Bride

You can download the script here.

I am working on another script to do a similar thing for a group of people, but it needs to be programmed differently, otherwise given a large enough list of users no artists would appear in the list.

5 Responses to “Last.fm musical taste overlap”

  1. Anonymous Says:

    Cool!

  2. parasti Says:

    Nice script! Which version of Python are you using, though? I had to import the sets module to get it to work.

  3. Stephen Paulger Says:

    I’m using python 2.4.2 but I think the script should work with anything above 2.4

  4. parasti Says:

    Yeah, I’m using 2.3.5 from the Debian Etch default ‘python’ package. According to the docs, sets isn’t a seperate module in 2.4.

  5. euphoria Says:

    Good script :)

Leave a Reply