title: Login to website using python requests
body: <p>I'm trying to login to <a href="https://www.voxbeam.com/login" rel="noreferrer">https://www.voxbeam.com/login</a> using requests to scrape data. I'm a python beginner and I have done mostly tutorials, and some web scraping on my own with BeautifulSoup.</p>
  
  <p>Looking at the HTML:</p>
  
  <pre><code>&lt;form id="loginForm" action="https://www.voxbeam.com//login" method="post" autocomplete="off"&gt;
  
  &lt;input name="userName" id="userName" class="text auto_focus" placeholder="Username" autocomplete="off" type="text"&gt;
  
  &lt;input name="password" id="password" class="password" placeholder="Password" autocomplete="off" type="password"&gt;
  
  &lt;input id="challenge" name="challenge" value="78ed64f09c5bcf53ead08d967482bfac" type="hidden"&gt;
  
  &lt;input id="hash" name="hash" type="hidden"&gt;
  </code></pre>
  
  <p>I understand I should be using the method <strong>post</strong>, and sending <strong>userName</strong> and <strong>password</strong></p>
  
  <p>I'm trying this:</p>
  
  <pre><code>import requests
  import webbrowser
  
  url = "https://www.voxbeam.com/login"
  login = {'userName': 'xxxxxxxxx',
           'password': 'yyyyyyyyy'}
  
  print("Original URL:", url)
  
  r = requests.post(url, data=login)
  
  print("\nNew URL", r.url)
  print("Status Code:", r.status_code)
  print("History:", r.history)
  
  print("\nRedirection:")
  for i in r.history:
      print(i.status_code, i.url)
  
  # Open r in the browser to check if I logged in
  new = 2  # open in a new tab, if possible
  webbrowser.open(r.url, new=new)
  </code></pre>
  
  <p>I’m expecting, after a successful login to get in <strong>r</strong> the URL to the dashboard, so I can begin scraping the data I need.</p>
  
  <p>When I run the code with the authentication information in place of xxxxxx and yyyyyy, I get the following output:</p>
  
  <pre><code>Original URL: https://www.voxbeam.com/login
  
  New URL https://www.voxbeam.com/login
  Status Code: 200
  History: []
  
  Redirection:
  
  Process finished with exit code 0
  </code></pre>
  
  <p>I get in the browser a new tab with www.voxbeam.com/login</p>
  
  <p>Is there something wrong in the code? 
  Am I missing something in the HTML?
  It’s ok to expect to get the dashboard URL in r, or to be redirected and trying to open the URL in a browser tab to check visually the response,  or I should be doing things in a different way?</p>
  
  <p>I been reading many similar questions here for a couple of days, but it seems every website authentication process is a little bit different, and I checked <a href="http://docs.python-requests.org/en/latest/user/authentication/" rel="noreferrer">http://docs.python-requests.org/en/latest/user/authentication/</a> which describes other methods, but I haven’t found anything in the HTML that would suggest I should be using one of those  instead of <strong>post</strong></p>
  
  <p>I tried too</p>
  
  <pre><code>r = requests.get(url, auth=('xxxxxxxx', 'yyyyyyyy')) 
  </code></pre>
  
  <p>but it doesn’t seem to work either.</p>