#!/usr/bin/env python # # h3x, an IRC bot written in Python # lastfm.py import string, re from urllib import urlopen def lastfm(user): # open the site last = urlopen("http://ws.audioscrobbler.com/1.0/user/%s/recenttracks.rss" % user) # read and close readit = last.read() last.close() # what we are looking for played = re.compile('