error reading api with urllib

Ian Kelly ian.g.kelly at gmail.com
Wed Dec 16 18:22:49 EST 2015


On Tue, Dec 15, 2015 at 7:46 PM, Simian <simian336 at gmail.com> wrote:
> 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.

Have you tried requesting the same URL with curl?



More information about the Python-list mailing list