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)
返回結(jié)果是這樣的
third_type
200
b'<html>\n<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">\n</html>\n'
<CookieJar[]>
?請(qǐng)問是什么情況?何解?
謝謝~
2019-01-16
解決了嗎,跟你問題一樣困擾已久
2018-10-10
第一種方法能再詳細(xì)的嗎
2018-10-05
你試試 這樣導(dǎo)入包:?