tools/web: add a URL normalizer function
This commit is contained in:
parent
7102e08000
commit
20105e7d98
3 changed files with 15 additions and 16 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue