Monday, May 4, 2009

I guarantee you: no more music by the suckas.

As mentioned earlier, I am a fan of blip.fm. I right now have 364 listeners, which is not shabby but not necessarily fantastic, either (I'm this guy). Blip makes it easy to add people you follow: specifically, if you blip The Gap Band, you're presented with a list of 5 or so people who also blipped The Gap Band, and with one click you can add them all.

This is not necessarily a bad idea, but these people add up fast, and horrendous musical whiplash can result as you find out somebody who blipped Sigur Ros once really really loves an abomination like 80s era Aerosmith. Even worse, a lot of these people won't be bothered to reciprocate: they'll have 5,000 listeners, but only 74 favorites. Perhaps they're discerning, but it just seems rude to me, and annoying.

Anyhow, I had accumulated 500+ favorite DJs, and many of them were deadbeats who weren't reciprocating. So with the handy blip.fm API, I wiped them all out like in that revenge montage from the first Godfather movie. Very, very minimal Python was required:
def getNoRecip(bconn, username, length):
lisses = bconn.user_getListeners(username,0,length)
faves = bconn.user_getFavoriteDJs(username,0,length)
lisNames = [l["urlName"] for l in lisses]
favNames = [f["urlName"] for f in faves]
noRecip = [f for f in favNames if f not in lisNames]
noRecip.sort()
youNoRecip = [l for l in lisNames if l not in favNames]
youNoRecip.sort()
return (noRecip, youNoRecip)

if __name__ == "__main__":
deaders = open("killed.log", "a")
deaders.write("Getting ready to wax some chumps.\n")
# need REAL password
blipConn = BlipConnection(username = 'SoundSystemSDC',
password='********')
(dudes, youDiss) = getNoRecip(blipConn,
'SoundSystemSDC',
1000)
for dude in dudes:
print "Killin' wack punk:\t%\n" % dude
blipConn.favorite_removeDJ(dude)
time.sleep(5)
deaders.write("Killed: %s\n" % dude)
print "That's %i shifty dudes." % len(dudes)
deaders.write("killed %s all told." % len(dudes))
deaders.close()
I put the sleep(5) in there to be nice, although it really wasn't that many requests all told.

It was quick and dirty, and kind of handy. Now it'd be nice to have a Greasemonkey plugin to filter out Blips from Aerosmith (and other unfavorite artists).

No comments:

Post a Comment