import urllib2 from BeautifulSoup import BeautifulSoup page = ('http://'); soup = BeautifulSoup(page,from_encoding="gb2312") print print ()