python - get cookie expiry time using the requests library
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to get the expiry time of a specific cookie that I retrieve from the server as: s = requests . session () r = s . get ( "http://localhost/test" ) r . cookies This will list all cookies sent by the server (I get 2 cookies) as: < <class 'requests.cookies.RequestsCookieJar' > [ <Cookie PHPSESSID = cusa6hbtb85li8po argcgev221 for localhost . local /> , <Cookie WebSecu = f for localhost . local / test > ]> When I do: r . cookies . keys I get: <bound method RequestsCookieJar.items of < <class 'requests.cookies.RequestsCooki