您将要从提交开机自检请求中获取HTML页面: import httplib
导入urllib
import urllib2
frombeautifulsoupimportrydds/p headers={
' host ' : ' digital vita.Pitt.edu ',
' Connection': 'keep-alive ',欢呼的帅哥325 ',
' origin ' : ' https://数字vita.Pitt.edu ',
'用户代理' : ' Mozilla/5.0 (MAC OS; 英特尔MAC OS x 10 _7_4) appleWebKit/537.1(khtml,like Gecko ) chrome/21.0.1180.89 safari/537.1 ',
'内容类型' : '应用程序/x-www-form-urlencoded; charset=UTF-8 ',
' Accept': 'text/javascript,text/html,application/xml,text/xml,*/* ',
' referer ' : ' https://数字vita.Pitt.edu/index.PHP ',deflate,sdch ',
' Accept-Language': 'en-US,en; q=0.8 ',utf-8; q=0.7,*; q=0.3 ',
' cookie ' : ' phpsessid=lvetilatpgs9okgrntk1nvn 595 '
}
data={
'动作' : ' search ',
' xdata ' : ' family name 100001 Dall ',
' request': 'search '
}
data=urllib.urlencode(data )
打印数据
req=urllib2. request (https://digital vita.Pitt.edu/dispatcher.PHP ),data,headers ) )。
response=urllib2.urlopen(req )
the_page=response.read (
打印软件
有人能告诉我该怎么做吗?