From eae76de93ef61e001e396c9305f1e97ac6a05b9e Mon Sep 17 00:00:00 2001 From: Andrei Date: Sat, 19 Nov 2022 05:06:37 +0300 Subject: [PATCH] Update base.py --- src/python3_captchaai/core/base.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/python3_captchaai/core/base.py b/src/python3_captchaai/core/base.py index 8fc8bfd5..7d084c1b 100644 --- a/src/python3_captchaai/core/base.py +++ b/src/python3_captchaai/core/base.py @@ -134,8 +134,6 @@ def _get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_RESULT.valu if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed): # if captcha ready\failed or have unknown status - return exist data return result_data - elif resp.status_code == 401: - raise ValueError("Authentication failed, indicating that the API key is not correct") else: raise ValueError(resp.raise_for_status()) except Exception as error: @@ -208,8 +206,6 @@ async def _aio_get_result(self, url_postfix: str = EndpointPostfixEnm.GET_TASK_R if result_data.status in (ResponseStatusEnm.Ready, ResponseStatusEnm.Failed): # if captcha ready\failed or have unknown status - return exist data return result_data - elif resp.status == 401: - raise ValueError("Authentication failed, indicating that the API key is not correct") else: raise ValueError(resp.reason) except Exception as error: