python3,第三种方法cookieja返回<CookieJar[]>是什么意思?
python3,第三种方法cookieja返回<CookieJar[]>是什么意思?
这是在pycharm中用Python3写的第三种方法(第一、第二种都很顺利)
import http.cookiejar
print("\nthird_type")
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
urllib.request.install_opener(opener)
response3 = urllib.request.urlopen(url)
print(response3.getcode())
print(response3.read())
print(cj)返回结果是这样的
third_type
200
b'<html>\n<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">\n</html>\n'
<CookieJar[]>
请问是什么情况?何解?
谢谢~

 
                             
                             
                            