第一种方法为什么无法打印出网页内容呢?
import urllib2 url = "http://www.baidu.com/" print "the first method" respones1 = urllib2.urlopen(url) print respones1.getcode() print len(respones1.read()) print respones1.read()
按理说应该会打印出来啊,为什么没有结果呢?
import urllib2 url = "http://www.baidu.com/" print "the first method" respones1 = urllib2.urlopen(url) print respones1.getcode() print len(respones1.read()) print respones1.read()
按理说应该会打印出来啊,为什么没有结果呢?
2016-04-18
举报