Очистил от рудиментов

This commit is contained in:
2020-05-08 20:28:19 +03:00
parent bb053bca07
commit 6b2303ec99

View File

@@ -18,7 +18,6 @@ script_path = os.path.abspath(os.path.dirname(sys.argv[0]))
if not os.path.exists(f'{script_path}/maps/'): if not os.path.exists(f'{script_path}/maps/'):
os.makedirs(f'{script_path}/maps/') os.makedirs(f'{script_path}/maps/')
devnull = open('/dev/null', 'w')
def url_grab(full_url): def url_grab(full_url):
@@ -65,8 +64,10 @@ if __name__ == '__main__':
subUrls = url_grab(url) subUrls = url_grab(url)
speed = input(f'{datetime.now().strftime("[%X]")} Введите скорость запросов(з/с) или оставьте пустым для максимальной: ') speed = input(
requestCount = int(input(f'{datetime.now().strftime("[%X]")} Введите число запросов: ')) f'{datetime.now().strftime("[%X]")} Введите скорость запросов(з/с) или оставьте пустым для максимальной: ')
requestCount = int(
input(f'{datetime.now().strftime("[%X]")} Введите число запросов: '))
requestCountExecuted = 0 requestCountExecuted = 0
requestCountSuccess = 0 requestCountSuccess = 0
@@ -98,5 +99,7 @@ if __name__ == '__main__':
endTime = time.time() - startTime endTime = time.time() - startTime
print(endTime) print(endTime)
print(f'{datetime.now().strftime("[%X]")} Успешных запросов: {requestCountSuccess}') print(
print(f'{datetime.now().strftime("[%X]")} Средняя скорость: {round(requestCountExecuted / endTime, 2)} з/с') f'{datetime.now().strftime("[%X]")} Успешных запросов: {requestCountSuccess}')
print(
f'{datetime.now().strftime("[%X]")} Средняя скорость: {round(requestCountExecuted / endTime, 2)} з/с')