title: urlopen of urllib.request cannot open a page in python 3.7
body: <p>I want to write webscraper to collect titles of articles from Medium.com webpage.</p>
  <p>I am trying to write a python script that will <strong>scrape</strong> headlines from Medium.com website. I am using python 3.7 and imported <code>urlopen</code> from <code>urllib.request</code>.
  But it cannot open the site and shows</p>
  <pre> "urllib.error.HTTPError: HTTP Error 403: Forbidden" error. </pre>
  <pre class="lang-py prettyprint-override"><code>from bs4 import BeautifulSoup
  from urllib.request import  urlopen
  
  webAdd = urlopen(&quot;https://medium.com/&quot;)
  bsObj = BeautifulSoup(webAdd.read())
  </code></pre>
  <pre>
  Result = urllib.error.HTTPError: HTTP Error 403: Forbidden</pre>
  <p>Expected result is that it will not show any error and just read the web site.</p>
  <p>But this does not happen when I use requests module.</p>
  <pre class="lang-py prettyprint-override"><code>import requests 
  from bs4 import BeautifulSoup 
  url = 'https://medium.com/' 
  response = requests.get(url, timeout=5)
  </code></pre>
  <p>This time around it works without error.</p>
  <p>Why ??</p>