Jon Skeet has the following reputation tracker which is built by C#.
I am interested in building a similar app by Python such that at least the following modules are used
The screenscraping is easy, if I understand the SO HTML format correctly, e.g., to get my rep (as I'm user 95810):
import urllib import BeautifulSoup page = urllib.urlopen('http://stackoverflow.com/users/95810') soup = BeautifulSoup.BeautifulSoup(page) therep = str(soup.find(text='Reputation').parent.previous.previous).strip() print int(therep.replace(',',''))
I'm not sure what you want to do with
defaultdict here, though -- what further processing do you desire to perform on this int, that would somehow require storing it in a defaultdict?