Testing content of a site

to check a website

$ python
Python 2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> print urllib.urlopen("http://www.linuxblog.info").getcode()
200

similar output to (put python script above will follow redirects)

curl -LI "http://www.linuxblog.info" 2>/dev/null | grep HTTP
HTTP/1.1 302 Found
HTTP/1.1 301 Moved Permanently
HTTP/1.1 200 OK