Commit 0487bfab by fwkz

verify=False

parent 7d5fcf2b
......@@ -276,11 +276,11 @@ def random_text(length, alph=string.letters+string.digits):
return ''.join(random.choice(alph) for _ in range(length))
def http_request(method, url, **kwargs):
def http_request(method, url, verify=False, **kwargs):
""" Wrapper for 'requests' silencing exceptions a little bit. """
try:
return getattr(requests, method.lower())(url, **kwargs)
return getattr(requests, method.lower())(url, verify=verify, **kwargs)
except (requests.exceptions.MissingSchema, requests.exceptions.InvalidSchema):
print_error("Invalid URL format: {}".format(url))
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment