title: Using python requests library to login to website
body: <p>I have looked through many SO threads on how to create a session using the <a href="http://docs.python-requests.org/en/latest/index.html" rel="nofollow">requests</a> library, but none of the methods I tried actually log me in. I have very little experience with web design and protocols, so please point out any basics that I might need to understand. Here is what I'm doing:</p>
  
  <pre><code>import requests
  
  EMAIL = 'my_email'
  PASSWORD = 'my_pw'
  URL = 'https://account.guildwars2.com/login'
  
  session = requests.session()
  
  login_data = dict(username=EMAIL, password=PASSWORD)
  r = session.post(URL, data=login_data)
  
  req = session.get('https://leaderboards.guildwars2.com/en/na/achievements/guild/Darkhaven%20Elite')
  
  print req.content
  </code></pre>
  
  <p>The content I am seeing is the content that I would see if I were not logged in. </p>
  
  <p>Is there anything incorrect about my syntax, or is the problem caused by the way the login page I am accessing is set up?</p>