title: python - get cookie expiry time using the requests library
body: <p>I am trying to get the expiry time of a specific cookie that I retrieve from the server as:</p>
  
  <pre><code>s = requests.session()
  r = s.get("http://localhost/test")
  r.cookies
  </code></pre>
  
  <p>This will list all cookies sent by the server (I get 2 cookies) as:</p>
  
  <pre><code>&lt;&lt;class 'requests.cookies.RequestsCookieJar'&gt;[&lt;Cookie PHPSESSID=cusa6hbtb85li8po
  argcgev221 for localhost.local/&gt;, &lt;Cookie WebSecu=f for localhost.local/test&gt;]&gt;
  </code></pre>
  
  <p>When I do:</p>
  
  <pre><code>r.cookies.keys
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>&lt;bound method RequestsCookieJar.items of &lt;&lt;class 'requests.cookies.RequestsCooki
  eJar'&gt;[Cookie(version=0, name='PHPSESSID', value='30tg9vn9376kmh60ana2essfi3', p
  ort=None, port_specified=False, domain='localhost.local', domain_specified=False
  , domain_initial_dot=False, path='/', path_specified=True, secure=False, expires
  =None, discard=True, comment=None, comment_url=None, rest={}, rfc2109=False), Co
  okie(version=0, name='WebSecu', value='f', port=None, port_specified=False, doma
  in='localhost.local', domain_specified=False, domain_initial_dot=False, path='/test', path_specified=False, secure=False, expires=1395491371, discard=Fals
  e, comment=None, comment_url=None, rest={}, rfc2109=False)]&gt;&gt;
  </code></pre>
  
  <p>As you can see, we have two cookies. I would like to get the expiry time of the cookie named "WebSecu"</p>
  
  <p>Thank you</p>