title: Python: Log in a website using urllib
body: <p>I want to log in to this website: <a href="https://www.fitbit.com/login">https://www.fitbit.com/login</a>
  This is my code I use:</p>
  
  <pre><code>import urllib2
  import urllib
  import cookielib
  
  login_url = 'https://www.fitbit.com/login'
  acc_pwd = {'login':'Log In','email':'username','password':'pwd'}
  cj = cookielib.CookieJar() ## add cookies
  opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
  opener.addheaders = [('User-agent','Mozilla/5.0 \
                      (compatible; MSIE 6.0; Windows NT 5.1)')]
  data = urllib.urlencode(acc_pwd)
  try:
      opener.open(login_url,data,10)
      print 'log in - success!'
  except:
      print 'log in - times out!', login_url
  </code></pre>
  
  <p>I use chrome to inspect the element of the input box, I tried many key pairs, but none works. Any one can help me take a look at this website? What is the correct data I show put in my variable acc_pwd?</p>
  
  <p>Thank you very much</p>