title: How do you access a HTTPS webpage with Python 3.4 by Proxy
body: <p>I am trying to access a HTTPS webpage that has a login. I can't access it no matter what i do. here is the code i tried below.</p>
  
  <pre><code>import urllib.request
  from bs4 import BeautifulSoup
  
  proxy = urllib.request.ProxyHandler({'http':'http://proxyName:proxyNumber'})
  opener = urllib.request.build_opener(proxy)
  urllib.request.install_opener(opener)
  response = urllib.request.urlopen('https://salesforce.com')
  datum = response.read()
  #.decode("UTF-8")
  #response.close()
  print(datum)
  </code></pre>
  
  <p>here is the ERROR</p>
  
  <pre><code>File S:\...py" line 8 in module
  reponse = urllib.request.urlopen("https://salesforce.com)
  urllib.error.URLError:(urlopen error [WinError 10061] No connection could be made because the target machine actively refused it)
  </code></pre>
  
  <p>Please help</p>
  
  <p>here is another try with new error. I feel like im getting close!</p>
  
  <pre><code>import urllib.request
  proxies = {'https': 'http://proxyName:ProxyNumber'}
  opener = urllib.request.build_opener(proxies)
  
  #urllib.request.get("https://login.salesforce.com/", proxies=proxies)
  urllib.request.install_opener(opener)
  response = urllib.request.urlopen("https://login.salesforce.com/", proxies=proxies)
  </code></pre>
  
  <p>Here is the Error message:</p>
  
  <pre><code>File S:/...py, line 6 in (module)
  urllib.request.build_opener(proxies)
  TypeError:expected BaseHandler instance, got (class 'dict)
  </code></pre>