title: How to get cookies from urllib.request?
body: <p>How to get cookie from an <code>urllib.request</code>?</p>
  
  <pre><code>import urllib.request
  import urllib.parse
  
  data = urllib.parse.urlencode({
      'user': 'user',
      'pass': 'pass'
  })
  data = data.encode('utf-8')
  
  request = urllib.request.urlopen('http://example.com', data)
  print(request.info())
  </code></pre>
  
  <p><code>request.info()</code> returns cookies but not in very usable way.</p>