I added except urllib.error.HTTPError as e: print('HTTP Errpr') print('Error code: ', e.code) to my try and I recieve... 400: ('Bad Request', 'Bad request syntax or unsupported method'), but processing the string with a browser works fine. Simi