Test if a webpage exists
curl --head http://google.com # or, the same: curl -I http://google.com
Sample output:
HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Tue, 24 Jan 2012 20:22:14 GMT Expires: Thu, 23 Feb 2012 20:22:14 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN
For a pure Python solution, check out this post.
This tip is from here.
Comments (0)
Trackbacks (0)
Leave a comment
Trackback