import urllib2, sys
from BeautifulSoup import BeautifulSoup
hdr = {'User-Agent': 'Mozilla/5.0'}
req = urllib2.Request(site,headers=hdr)
page = urllib2.urlopen(req) . => urllib2.HTTPError: HTTP Error 404: Not Found
soup = BeautifulSoup(page)
print soup