allow head requests to follow redirects

This commit is contained in:
iou1name 2020-07-16 13:39:58 -04:00
parent 989d1ab726
commit 8225efe9cc

View File

@ -21,7 +21,7 @@ def isup(bot, trigger):
url = "http://" + url url = "http://" + url
try: try:
res = requests.head(url, timeout=10, verify=True) res = requests.head(url, timeout=10, allow_redirects=True)
except (requests.exceptions.MissingSchema, except (requests.exceptions.MissingSchema,
requests.exceptions.InvalidSchema): requests.exceptions.InvalidSchema):
return bot.msg("Missing or invalid schema. Check the URL.") return bot.msg("Missing or invalid schema. Check the URL.")