urllib2获取抓取的数据信息,urllib2获取抓取,urlfile = ur


urlfile = urllib2.urlopen('<a href="http://www.commentcamarche.net/">http://www.commentcamarche.net/')print "Document type is", urlfile.info().getheader("Content-Type","")#输出:Document type is text/htmlprint "HTTP Response headers:"print urlfile.info()#输出:#Document type is Date: Thu, 23 Mar 2006 15:13:29 GMT#Content-Type: text/html; charset=iso-8859-1#Server: Apache#X-Powered-By: PHP/5.1.2-1.dotdeb.2#Connection: close#该片段来自于http://byrx.net

评论关闭