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.
November 30th, 2005 at 12:31 pm
Cool!
December 23rd, 2005 at 9:05 pm
Nice script! Which version of Python are you using, though? I had to import the sets module to get it to work.
December 24th, 2005 at 9:09 pm
I’m using python 2.4.2 but I think the script should work with anything above 2.4
December 24th, 2005 at 10:22 pm
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.
December 30th, 2005 at 6:21 pm
Good script