1import urllib2
2from BeautifulSoup import BeautifulSoup
3# or if you're using BeautifulSoup4:
4# from bs4 import BeautifulSoup
5
6soup = BeautifulSoup(urllib2.urlopen('http://example.com').read())
7
8for row in soup('table', {'class': 'spad'})[0].tbody('tr'):
9 tds = row('td')
10 print tds[0].string, tds[1].string
11 # will print date and sunrise