title: Why can't I get scraped data from a website with BeautifulSoup? I'm getting timeout error
body: <p>I was trying to get data from the following website but I get the error which is shown below. PFB the code for the same.   </p>
  
  <pre><code>from urllib2 import urlopen
  import bs4 as bs
  response = urlopen('http://www.mec.ac.in/mec/stats2018.php')
  html = response.read()
  soup = bs.BeautifulSoup(response,'lxml')
  print soup.title
  </code></pre>
  
  <p>PFB the error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "et.py", line 3, in &lt;module&gt;
      response = urlopen('http://www.mec.ac.in/mec/stats2018.php')
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
      return opener.open(url, data, timeout)
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
      response = meth(req, response)
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
      'http', request, response, code, msg, hdrs)
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
      return self._call_chain(*args)
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
      result = func(*args)
    File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
      raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 403: Forbidden
  </code></pre>
  
  <p>How can I retrieve data after recovering this error?</p>