Fast URL validation?

Thomas Wouters thomas at xs4all.net
Tue Mar 11 13:25:44 CET 2003


On Tue, Mar 11, 2003 at 11:45:29AM +0000, Robert Oschler wrote:
> Is there a way, with Python 2.2,  to validate a URL without having to
> download the entire document?  I want to rapidly (very rapidly!) scan a list
> of URL's and make sure I don't get a "server not found" or "page not found"
> error.  What external library would I need to import and and what functions?

Use httplib and the 'HEAD' command. HEAD is intended for just that.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!





More information about the Python-list mailing list