title: Python 3.6.5 - issues using urlopen and downloading contents
body: <p>I'm relatively new to python and have just started using some of the web functions. But it seems regardless of what I do I can't get a web page to open (url open), and copy the contents to a text file. </p>
  
  <pre><code>from urllib.request import urlopen
  url = https://en.wikipedia.org/wiki/Main_Page
  web_page = urlopen(url)
  web_page_bytes = web_page.read()
  web_page_text = web_page_bytes.decode('UTF-8')
  filename = 'download.html'
  html_file = open('download.html', 'w', encoding = 'UTF-8')
  html_file.write(web_page_text)
  </code></pre>
  
  <p>It seems regardless of what I do, I can't get anything to open or download. Am I doing something wrong in the coding, or could it be something software related. (using MacOS)
  Any help would be appreciated. </p>