Re: HTTP response code

2004-12-05 Thread Fredrik Lundh
Jonas Galvez wrote: > Hi list, here's a question about urllib. Is it possible to simply > retrieve the HTTP responde code for a given URL? I don't want to > download the body of the HTTP message. I simply want to check the > response code, like, if it is 200, 301 etc. Something like: > > if urllib

Re: HTTP response code

2004-12-04 Thread Ian Bicking
Jonas Galvez wrote: Hi list, here's a question about urllib. Is it possible to simply retrieve the HTTP responde code for a given URL? I don't want to download the body of the HTTP message. I simply want to check the response code, like, if it is 200, 301 etc. Something like: if urllib.urlopen(

Re: HTTP response code

2004-12-04 Thread Carlos Ribeiro
On Fri, 3 Dec 2004 17:28:43 -0200, Jonas Galvez <[EMAIL PROTECTED]> wrote: > Hi list, here's a question about urllib. Is it possible to simply > retrieve the HTTP responde code for a given URL? I don't want to > download the body of the HTTP message. I simply want to check the > response code, like

HTTP response code

2004-12-03 Thread Jonas Galvez
Hi list, here's a question about urllib. Is it possible to simply retrieve the HTTP responde code for a given URL? I don't want to download the body of the HTTP message. I simply want to check the response code, like, if it is 200, 301 etc. Something like: if urllib.urlopen(the_url).response_co