# -*- coding: utf-8 -*- # 文字列検索・置換モジュールの import import re # URLを取得するモジュールの import import urllib2 # URLチェック関数 def checkURL(url): if re.match(r"^https?:\/\/", url): try: response = urllib2.urlopen(url) response.close() return "OK" except urllib2.HTTPError as e: print "NotFound: " + url return "NG Error Code: ", e.code except urllib2.URLError as e: print "NotFound: " + url return "NG Reason: ", e.rea