Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100540
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: error reading api with urllib |
| Date | 2015-12-16 16:22 -0700 |
| Message-ID | <mailman.25.1450308211.30845.python-list@python.org> (permalink) |
| References | <9aa21642-765b-4666-8c66-a6dab9928c37@googlegroups.com> <f9370000-5b40-41e5-a355-471f3225c6ef@googlegroups.com> |
On Tue, Dec 15, 2015 at 7:46 PM, Simian <simian336@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?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
error reading api with urllib simian336@gmail.com - 2015-12-15 17:54 -0800
Re: error reading api with urllib Simian <simian336@gmail.com> - 2015-12-15 18:46 -0800
Re: error reading api with urllib Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-16 16:22 -0700
Re: error reading api with urllib John Gordon <gordon@panix.com> - 2015-12-16 22:12 +0000
Re: error reading api with urllib Ian Kelly <ian.g.kelly@gmail.com> - 2015-12-16 16:24 -0700
Re: error reading api with urllib Simian <simian336@gmail.com> - 2015-12-17 11:29 -0800
csiph-web