title: Why would HTTPConnection not work? nonnumeric port
body: <p>I'm trying to use httplib to check if each url in a list of 30k+ websites still works. Each url is read in from a .csv file, and into a matrix, and then that matrix goes through a for-loop for each url in the file. Afterwards, (where my problem is), I run a function, runInternet(url), which takes in the url string, and returns true if the url works, and false if it doesn't.
  I've used <a href="https://stackoverflow.com/questions/4041443/python-verify-url-goes-to-a-page">this</a> as my baseline, and have also looked into <a href="https://stackoverflow.com/questions/16778435/python-check-if-website-exists">this</a>. While I've tried both, I don't quite understand the latter, and neither works...</p>
  
  <pre><code>def runInternet(url):
      try:
          page = httplib.HTTPConnection(url)
          page.connect()
      except httplib.HTTPException as e:
          return False
      return True
  </code></pre>
  
  <p>However, afterwards, all the links are stated as broken! I randomly chose a few that worked, and they work when I input them into my browser...so what's happening? I've narrowed down the problem spot to this line:
          page = httplib.HTTPConnection(url)</p>
  
  <p>Edit: I tried inputting 'www.google.com' in exchange for the url, and the program works, and when I try printing e, it says nonnumeric port...</p>