From d02d6c3da57ac86aaf2b3ef9c3672bad3d66ed7b Mon Sep 17 00:00:00 2001 From: Andrei Date: Fri, 28 Oct 2022 04:38:09 +0300 Subject: [PATCH] Update ImageToTextTask.py --- python3_anticaptcha/ImageToTextTask.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/python3_anticaptcha/ImageToTextTask.py b/python3_anticaptcha/ImageToTextTask.py index 8ad9d99..87537ed 100644 --- a/python3_anticaptcha/ImageToTextTask.py +++ b/python3_anticaptcha/ImageToTextTask.py @@ -178,7 +178,17 @@ class ImageToTextTask: """ # Список допустимых параметров Session.request() - session_attrs = ['headers', 'cookies', 'auth', 'proxies', 'hooks', 'params', 'verify', 'cert', 'stream'] + session_attrs = [ + "headers", + "cookies", + "auth", + "proxies", + "hooks", + "params", + "verify", + "cert", + "stream", + ] session_params = kwargs.copy() for key in kwargs: if key in session_attrs: @@ -217,7 +227,9 @@ class ImageToTextTask: else: # Ожидаем решения капчи time.sleep(self.sleep_time) - return get_sync_result(result_payload=self.result_payload, sleep_time=self.sleep_time, **session_params) + return get_sync_result( + result_payload=self.result_payload, sleep_time=self.sleep_time, **session_params + ) class aioImageToTextTask: