title: Scrape and login to angular webabb using Python
body: <p>I'm trying to login to an angular webapp. </p>
  
  <p>I tried using multiple packages like requests, urllib, mechanize etc., but can't figure out what I'm missing/ is going wrong. Here's the code:</p>
  
  <pre><code>import requests
  from requests.utils import quote
  
  session = requests.Session()
  session.cookies.get_dict()
  url = 'https://my.url.com'
  authentication = {"username":"name","password":"pswd","domain":"domain_id","rURL":"https://another.url.com/something"}
  reqs = requests.post(url)
  response = session.get(reqs.url)
  new_req = requests.post(url, data = authentication)
  print new_req.text
  </code></pre>
  
  <p>However, it doesn't log me in and prints the login page again. </p>