Fix https links when available, everywhere

This commit is contained in:
Max 2017-10-06 02:54:37 +02:00 committed by Pierre-Olivier Mercier
commit e0d7ef1314
15 changed files with 19 additions and 19 deletions

View file

@ -17,7 +17,7 @@ def validator(url):
raise IMException("Indicate a valid URL!")
try:
req = urllib.request.Request("http://validator.w3.org/check?uri=%s&output=json" % (urllib.parse.quote(o.geturl())), headers={ 'User-Agent' : "Nemubot v%s" % __version__})
req = urllib.request.Request("https://validator.w3.org/check?uri=%s&output=json" % (urllib.parse.quote(o.geturl())), headers={ 'User-Agent' : "Nemubot v%s" % __version__})
raw = urllib.request.urlopen(req, timeout=10)
except urllib.error.HTTPError as e:
raise IMException("HTTP error occurs: %s %s" % (e.code, e.reason))