if theurl.startswith(\"http://\"): theurl = theurl[7:] head = theurl[:theurl.find(\'/\')] tail = theurl[theurl.find(\'/\'):] response_code = 0 import httplib
I saw this error when trying to access a HTTPS/SSL URL using httplib.HTTPConnection
You should use httplib.HTTPSConnection to access SSL urls.