title: Python: requests can't login to a website
body: <p>I need to scrape website that requires login. I'm trying to create a <code>session</code> and login as I have to scrape different pages after logging in. But can't find out why it's not working.</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  login_data = {
             "log":"login",
             "login":"my email",
             "password":"my password"
  }
  
  session = requests.session()
  session.post(login_url, data=login_data)
  response = session.get(url)
  html = response.text
  soup = BeautifulSoup(html, "html.parser")
  print(soup.title.get_text())
  </code></pre>
  
  <p>Title shows it's not working.</p>
  
  <p>Here is the website form.</p>
  
  <pre><code>&lt;form method="post" id="signin-form" class="form-horizontal"&gt;
      &lt;input type="hidden" name="referer" value="" /&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="email_text" class="col-sm-4 control-label"&gt;Your login (email):&lt;/label&gt;
          &lt;div class="col-sm-8"&gt;
              &lt;input type="email" class="form-control" id="email_text" value="" name="login" autofocus data-validation='{"parent":".form-group","events":["keyup","blur"],"rules":[{"name":"notblank"},{"name":"email"}]}' /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="password_text" class="col-sm-4 control-label"&gt;Password:&lt;/label&gt;
          &lt;div class="col-sm-8"&gt;
              &lt;input type="password" class="form-control" id="password_text" name="password" data-validation='{"parent":".form-group","rules":[{"name":"min","min":5}]}' /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;div class="col-sm-8 col-sm-offset-4"&gt;
              &lt;div class="checkbox"&gt;
                  &lt;label&gt;
                      &lt;input type="checkbox" name="rememberme"&gt; Remember me on this computer
                  &lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;div class="col-sm-offset-4 col-sm-8"&gt;
              &lt;button type="submit" class="btn btn-default btn-lg" name="log"&gt;Log into your account&lt;/button&gt;
              &lt;a class="btn btn-default btn-lg mobile-show-inline-block" href="/account/create/"&gt;Create account&lt;/a&gt;
              &lt;a href="/account/lostpassword" class="btn btn-link btn-lg"&gt;Forgot your password?&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>N.B: Don't suggest me to use <code>selenium</code>. I can do this with <code>selenium</code> and I tested that but I have to stick to <code>requests</code> because <code>selenium</code> pops up console even if I use <code>PhantomJS</code>.</p>