#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import cookielib
url = 'http://www.baidu.com'
print '第一种方法'
response1 = urllib2.urlopen(url)
print response1.getcode()
print len(response1.read())
# -*- coding: utf-8 -*-
import urllib2
import cookielib
url = 'http://www.baidu.com'
print '第一种方法'
response1 = urllib2.urlopen(url)
print response1.getcode()
print len(response1.read())
2016-05-09