[code="python"]
import urllib2
from BeautifulSoup import BeautifulSoup,Tag
import re
import os
import stat
url_str="http://ispo-mediaservices.com/prj_152/customer/"
headers = {"User-Agent":"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"}
req =urllib2.Request(url_str,headers=headers)
page=urllib2.urlopen(req)
soup = BeautifulSoup(page,fromEncoding="utf8")
#print unicode(soup.findAll("table")[4])
kk=soup.html.head.title
print kk
[/code]
URL不要换(URL换成http://www.google.com能调通) 谢谢 请赐教