Paul Graham’s Essays

Paul Graham’s Essays don’t show when they were written, so this one goes through all of the essays and finds out.

import feedparser
import re
import urllib

#Regular expression that looks for something like this: "March 2004"
date_search = re.compile('([A-Z][a-z]* 200[0-9])')

def open_url(url):
    response = urllib.urlopen(url)
    data =
    return data

rss_feed = feedparser.parse('')

for entry in rss_feed['entries']:
    print entry['title'],
    url = entry['link']
    page = open_url(url)
    dates = date_search.findall(page)
    if not dates:
        print 'Unknown'
        print dates[0]