This commit is contained in:
parent
bfaaf74395
commit
a6ae230f8e
10
httpoll.py
10
httpoll.py
@ -2,7 +2,6 @@
|
||||
|
||||
import argparse
|
||||
import requests
|
||||
import sys
|
||||
from time import time, sleep
|
||||
|
||||
import urllib3
|
||||
@ -21,11 +20,8 @@ def poll():
|
||||
time_start = time()
|
||||
status, result = "", ""
|
||||
try:
|
||||
r = requests.get(
|
||||
url = args.URL,
|
||||
timeout = 10.0,
|
||||
verify = False,
|
||||
proxies = no_proxy)
|
||||
r = requests.get(url=args.URL, timeout=10.0,
|
||||
verify=False, proxies=no_proxy)
|
||||
status = "ok"
|
||||
result = str(r)
|
||||
except requests.exceptions.RequestException as e:
|
||||
@ -62,5 +58,3 @@ if __name__ == "__main__":
|
||||
|
||||
except KeyboardInterrupt:
|
||||
exit()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user