vendredi 22 septembre 2017

Error on web scraping using BeautifulSoup

I call a website and try to extract html tags from it

from urllib2 import urlopen as uReq
from bs4 import BeautifulSoup as soup  
myurl = 'http://ift.tt/2xnOlBC'
uClient=uReq(myurl)

Error:

Traceback (most recent call last):  
  File "<stdin>", line 1, in <module>  
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen  
    return _opener.open(url, data, timeout)  
  File "/usr/lib/python2.7/urllib2.py", line 410, in open  
    response = meth(req, response)  
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response  
    'http', request, response, code, msg, hdrs)  
  File "/usr/lib/python2.7/urllib2.py", line 448, in error  
    return self._call_chain(*args)  
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain  
    result = func(*args)  
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default  
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)  
urllib2.HTTPError: HTTP Error 999: Request denied  

Why is that? Is there a better way for me to browse through linkedin and extract jobs information for a specific role like business analyst




Aucun commentaire:

Enregistrer un commentaire