tools/web: add a URL normalizer function

This commit is contained in:
nemunaire 2015-10-11 17:04:21 +02:00
commit 20105e7d98
3 changed files with 15 additions and 16 deletions

View file

@ -10,8 +10,6 @@ def isup(url):
"""
o = urllib.parse.urlparse(url, "http")
if o.netloc == "":
o = urllib.parse.urlparse("http://" + url)
if o.netloc != "":
isup = getJSON("http://isitup.org/%s.json" % o.netloc)
if isup is not None and "status_code" in isup and isup["status_code"] == 1: