title: How to get information from xml after login with requests python
body: <p>I am trying to get some data from an xml of a website which requires to login first. I try to get python requests Session and I am able to login using get method (shows 200). After that I try to get access to the xml, but it gets me 401.</p>
  <p>So far I know that the server checks with each call whether the client is sending a JSESSIONID cookie and whether the VALUE matches the current session.</p>
  <p>I manage to get the corresponding cookies and tried to send it via post method but still get 401.</p>
  <p>Maybe I think to complicated. I also do not need to achieve this with requests. I would be glad to just get the information from the xml.</p>
  <pre><code>import requests
  
  login_url = 'https://www.example.com/login
  
  USER_NAME = 'user'
  PASSWORD = 'pass'
  
  xml = 'https://www.example.com/channel_index?123&amp;p=web'   
  
  with requests.Session() as s:
      response = s.get(login_url,auth = (USER_NAME, PASSWORD))
      print(response)   
  
      r = s.get(xml)    
      cookies = s.cookies.get_dict() 
      r = s.post(xml, cookies = cookies)
      print(r)
  </code></pre>