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