I would like that script would keep running, i.e. requesting urls with different words, depite errors.
Currently script stops running if error occurs.
Currently script stops running if error occurs.
Code:
#word comes from the list of words
res6="http://glosbe.com/en/el/"+word
try:
resp = urllib.request.urlopen(res)
if resp.getcode() == 200:
html = resp.read()
#proceed with result...
except urlib.error.HTTPerror as e :
print(str(e.getcode()))
#proceed with error...
Comment