def save_cookie():
cookie = cookielib.MozillaCookieJar('cookie.txt')
opener = urllib2.build_opener(HTTPCookieProcessor(cookie))
req = urllib2.Request(url=targeturl,headers=targetheaders)
opener.open(req)
cookie.save(ignore_discard=True,ignore_expires=True)
我想通过cookielib.MozillaCookieJar('cookie.txt').load()来读取所保存的cookies,
但发现返回值是None!