title: Using pycurl to login and retrieve cookie
body: <p>I found something similar to something I want to do using urllib2 here: <a href="https://stackoverflow.com/questions/189555/how-to-use-python-to-login-to-a-webpage-and-retrieve-cookies-for-later-usage">How to use Python to login to a webpage and retrieve cookies for later usage?</a></p>
  
  <p>Their solution was : </p>
  
  <pre><code>import urllib, urllib2, cookielib
  
  username = 'myuser'
  password = 'mypassword'
  
  cj = cookielib.CookieJar()
  opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  login_data = urllib.urlencode({'username' : username, 'j_password' : password})
  opener.open('http://www.example.com/login.php', login_data)
  resp = opener.open('http://www.example.com/hiddenpage.php')
  print resp.read()
  </code></pre>
  
  <p>I want something like this using pycurl if possible. Any assistance would be appreciated.</p>