1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import urllib2 as ul
from BeautifulSoup import BeautifulSoup as bs

url = 'http://www.federalreserve.gov/monetarypolicy/fomchistorical2005.htm'
html = ul.urlopen(url).read()
soup = bs.BeautifulSoup(html,parseOnlyThese=bs.SoupStrainer('td','minutes'))
meetings = soup.findAll('td')

dates = []
for m in meetings:
   links = m.findAll('a')
   for link in links:
      if link.text == 'Minutes':
         url_string = link.attrs[0][1]
         dates.append(url_string.split('/')[-1].rstrip('.htm'))