title: Python HTTP request through proxy working, but HTTPS request not working
body: <p>I have some code to request a URL external to my organisation's network:    </p>
  
  <pre><code>proxy_string = 'http://proxyIP:proxyport'
  s = requests.Session()
  s.trust_env=False
  s.proxies = {"http": proxy_string , "https": proxy_string}
  s.auth = HTTPProxyAuth("ad\user","password")
  url = "http://canoeracing.org.uk/marathon/results/results2017.html"
  
  r = s.get(url)
  r.status_code
  tree = html.fromstring(r.content)
  r.content
  </code></pre>
  
  <p>This works fine if the URL is an HTTP (like the one above), but not if it's an HTTPS URL (so change <code>url</code> to <code>https://stackoverflow.com/questions/894168/programmatically-make-http-requests-through-proxies-with-python</code>). Things I've tried:</p>
  
  <ul>
  <li>Changing the <code>HTTPS_Proxy</code> in the command line</li>
  <li>Changing <code>proxy_string</code> to <code>https://...</code></li>
  </ul>
  
  <p>I know there's some similar questions to this, but I couldn't find any that had had this specific problem of HTTP requests working through a proxy but HTTP requests not.</p>