check if an URL exists without opening it
andy at agmweb.ca
Sat Aug 10 22:22:32 CEST 2002
> You COULD try opening the URL and then abandoning the download as soon
> as you get the first few bytes of the content, but I wouldn't advise it.
> A huge amount of the overhead is in creating the TCP/IP connection and
> sending HTTP headers.. if there's a reasonable chance you'll want to
> download the contents of the URL I'd go ahead and do it.
Uses httplib and HEAD
More information about the Python-list