import urllib.request, urllib.error, urllib.parse
from BeautifulSoup import BeautifulSoup
soup = BeautifulSoup(urllib.request.urlopen('http://example.com').read())
for row in soup('table', {'class': 'spad'})[0].tbody('tr'):
    tds = row('td')
print(tds[0].string, tds[1].string)
Веб-скрапинг с помощью Python