如果cookie设置了httponly
, document.cookie
是拿不到
import requests url = "http://172.16.20.25:82/Center/SaveCookie?username=web&password=123&token=isLogined&option=3 " cookie = requests.get(url).cookies cookies = requests.utils.dict_from_cookiejar(cookie) print(cookies)
返回结果为空