import urllib.request, urllib.error, urllib.parse
from BeautifulSoup import BeautifulSoup
html = urllib.request.urlopen('http://www.google.com').read()
soup = BeautifulSoup(html)
all_links = soup.findAll('a')
Regex for links in html text