title: Python-requests : how do I check if a user already logged in or not?
body: <p>I'm writing a simple Python program using only requests module.</p>
  
  <pre><code>s = requests.Session()
  #if a user is already logged in, then execute next statement
  r = s.get(url)  #or r = s.get(url,data=data) In general
  else
  #ask user to provide valid login credentials and use s.post(url,data=data,headers=headers)
  #and update session
  </code></pre>
  
  <p>so my question is how can I check If a provided user credentials are of user's which is already logged in?</p>