Remove Loading

This commit is contained in:
Narbeh 2018-04-22 17:36:40 +04:30
parent 43ebb12f4c
commit 66ff78b9cf

View File

@ -52,15 +52,14 @@ def analyze_ssl(host, context):
from urllib2 import urlopen
api_url = 'https://api.ssllabs.com/api/v3/'
counter = 0
while True:
main_request = loads(urlopen(api_url + 'analyze?host={}'.format(host)).read().decode('utf-8'))
if main_request['status'] in ['DNS', 'IN_PROGRESS']:
print('Analyzing {}. Please wait'.format(host) + '.' * counter)
sys.stdout.write("\033[F")
counter += 1
if main_request['status'] == 'DNS':
print('Analyzing the security of {}. Please wait...'.format(host))
continue
if main_request['status'] == 'IN_PROGRESS':
# We can find a way to show the progress
pass
elif main_request['status'] == 'READY':
break