title: How to attach .netrc file to python requests get method?
body: <p>I am trying to login to a site using python requests. Normally I do this using curl in the cmd.</p>
  <pre><code>curl -c &lt;path/urs_cookies.txt&gt; -n -L https://site_FileUpload/login
  </code></pre>
  <p>Where the -n searches for the .netrc file in the cwd which contains my username and password.</p>
  <p>However doing this in python using does not work</p>
  <pre><code>login = requests.get(url, auth=(username, password)) 
  </code></pre>
  <p>I believe this is because I need to use my .netrc file instead of using the authorisation method.</p>
  <p>Is there anyway I can attach this file to my login request?</p>
  <p>Thanks a lot</p>