Im going through several hundred bit.ly links to see if they have been used to shorten a link. If a link has not, it returns this page.
How can I iterate through a list of links to check which ones do NOT return this page?
I tried using the head method used in this question, however that always returned true, of course.
I looked into the head method, but found out that it never returns any data:
>>> import httplib
>>> conn = httplib.HTTPConnection("www.python.org")
>>> conn.request("HEAD","/index.html")
>>> res = conn.getresponse()
>>> print res.status, res.reason
200 OK
>>> data = res.read()
>>> print len(data)
0
>>> data == ''
True
I'm stumped on this, and any help would be great.