爬虫学习----获取cookie
http://blog.csdn.net/samxx8/article/details/21535901
1.获取cookie
import urllib
import http.cookiejar
cookie = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cookie))
response = opener.open('http://www.weibo.com')
for item in cookie:
print ('Name = '+item.name)
print ('Value = '+item.value)