From 6b2303ec998e48b4f0e013b80af0aa200520e2fd Mon Sep 17 00:00:00 2001 From: Llloooggg Date: Fri, 8 May 2020 20:28:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=87=D0=B8=D1=81=D1=82=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BE=D1=82=20=D1=80=D1=83=D0=B4=D0=B8=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/__init__.py b/__init__.py index 140617c..1fb752d 100755 --- a/__init__.py +++ b/__init__.py @@ -17,8 +17,7 @@ script_path = os.path.abspath(os.path.dirname(sys.argv[0])) if not os.path.exists(f'{script_path}/maps/'): os.makedirs(f'{script_path}/maps/') - -devnull = open('/dev/null', 'w') + def url_grab(full_url): @@ -65,8 +64,10 @@ if __name__ == '__main__': subUrls = url_grab(url) - speed = input(f'{datetime.now().strftime("[%X]")} Введите скорость запросов(з/с) или оставьте пустым для максимальной: ') - requestCount = int(input(f'{datetime.now().strftime("[%X]")} Введите число запросов: ')) + speed = input( + f'{datetime.now().strftime("[%X]")} Введите скорость запросов(з/с) или оставьте пустым для максимальной: ') + requestCount = int( + input(f'{datetime.now().strftime("[%X]")} Введите число запросов: ')) requestCountExecuted = 0 requestCountSuccess = 0 @@ -98,5 +99,7 @@ if __name__ == '__main__': endTime = time.time() - startTime print(endTime) - print(f'{datetime.now().strftime("[%X]")} Успешных запросов: {requestCountSuccess}') - print(f'{datetime.now().strftime("[%X]")} Средняя скорость: {round(requestCountExecuted / endTime, 2)} з/с') + print( + f'{datetime.now().strftime("[%X]")} Успешных запросов: {requestCountSuccess}') + print( + f'{datetime.now().strftime("[%X]")} Средняя скорость: {round(requestCountExecuted / endTime, 2)} з/с')