import urllib2 req = urllib2.Request("http://localhost:8080") res = urllib2.urlopen( req ) headers = str(res.info()) print(headers) html=res.read() print(html)
转载于:https://www.cnblogs.com/fanzi2009/archive/2009/07/24/1530413.html
import urllib2 req = urllib2.Request("http://localhost:8080") res = urllib2.urlopen( req ) headers = str(res.info()) print(headers) html=res.read() print(html)
转载于:https://www.cnblogs.com/fanzi2009/archive/2009/07/24/1530413.html