From 12c639d87731cf30f306c2657f1d9f0879a2a65e Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 14:01:32 +0200 Subject: [PATCH 01/13] src\python_rucaptcha\re_captcha.py line-too-long Made readable too long line shorter --- src/python_rucaptcha/re_captcha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_rucaptcha/re_captcha.py b/src/python_rucaptcha/re_captcha.py index 2ecfbada7..0204974cc 100644 --- a/src/python_rucaptcha/re_captcha.py +++ b/src/python_rucaptcha/re_captcha.py @@ -142,7 +142,8 @@ def __init__( # check user params if method not in ReCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {ReCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {ReCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From e49ff8221290dd62d096e36003f366939d65c53b Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 14:07:10 +0200 Subject: [PATCH 02/13] src\python_rucaptcha\lemin_captcha.py line-too-long Made readable two too long lines shorter --- src/python_rucaptcha/lemin_captcha.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/lemin_captcha.py b/src/python_rucaptcha/lemin_captcha.py index 0c637db92..bd133246c 100644 --- a/src/python_rucaptcha/lemin_captcha.py +++ b/src/python_rucaptcha/lemin_captcha.py @@ -78,11 +78,14 @@ def __init__( """ super().__init__(method=method, *args, **kwargs) - self.create_task_payload["task"].update({"websiteURL": websiteURL, "captchaId": captchaId, "div_id": div_id}) + self.create_task_payload["task"].update({"websiteURL": websiteURL, + "captchaId": captchaId, + "div_id": div_id}) # check user params if method not in LeminCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {LeminCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {LeminCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From 62c0dde8bd0b0188b1c083e00873f3d1e679671f Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 14:20:02 +0200 Subject: [PATCH 03/13] src\python_rucaptcha\tencent.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/tencent.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/tencent.py b/src/python_rucaptcha/tencent.py index 208f7f9b8..3cadc275c 100644 --- a/src/python_rucaptcha/tencent.py +++ b/src/python_rucaptcha/tencent.py @@ -19,7 +19,8 @@ def __init__( Args: rucaptcha_key: User API key websiteURL: The full URL of target web page where the captcha is loaded. - We do not open the page, not a problem if it is available only for authenticated users + We do not open the page, not a problem if it is available + only for authenticated users appId: The value of `appId` parameter in the website source code. method: Captcha type @@ -81,7 +82,8 @@ def __init__( # check user params if method not in TencentEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {TencentEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {TencentEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From 08e31cf92545c3908027a688fdf28e5e3c21a5e3 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 14:40:39 +0200 Subject: [PATCH 04/13] src\python_rucaptcha\rotate_captcha.py line-too-long Made a readable too long line shorter --- src/python_rucaptcha/rotate_captcha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_rucaptcha/rotate_captcha.py b/src/python_rucaptcha/rotate_captcha.py index 25f2568dd..17f5df1a4 100644 --- a/src/python_rucaptcha/rotate_captcha.py +++ b/src/python_rucaptcha/rotate_captcha.py @@ -74,7 +74,8 @@ def __init__( } >>> await RotateCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122", - ... angle=45).aio_captcha_handler(captcha_file="examples/rotate/rotate_ex.png") + ... angle=45).aio_captcha_handler( + ... captcha_file="examples/rotate/rotate_ex.png") { "errorId":0, "status":"ready", From 3a4d248f793a83f16411c9b59e2608a0553853d6 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:07:02 +0200 Subject: [PATCH 05/13] src\python_rucaptcha\mt_captcha.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/mt_captcha.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/mt_captcha.py b/src/python_rucaptcha/mt_captcha.py index 25b6a43f7..ed208ed20 100644 --- a/src/python_rucaptcha/mt_captcha.py +++ b/src/python_rucaptcha/mt_captcha.py @@ -70,10 +70,12 @@ def __init__( """ super().__init__(method=method, *args, **kwargs) - self.create_task_payload["task"].update({"websiteURL": websiteURL, "websiteKey": websiteKey}) + self.create_task_payload["task"].update({"websiteURL": websiteURL, + "websiteKey": websiteKey}) # check user params if method not in MTCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {MTCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {MTCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From a177360cfcc9ced01ab4941b28cba1d34dbdaba0 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:09:17 +0200 Subject: [PATCH 06/13] src\python_rucaptcha\key_captcha.py line-too-long Made a readable too long line shorter --- src/python_rucaptcha/key_captcha.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_rucaptcha/key_captcha.py b/src/python_rucaptcha/key_captcha.py index 28a31d1d5..f4c609a70 100644 --- a/src/python_rucaptcha/key_captcha.py +++ b/src/python_rucaptcha/key_captcha.py @@ -80,7 +80,8 @@ def __init__( # check user params if method not in KeyCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {KeyCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {KeyCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From ae61960529089c5a47bb6d235b30d69a419d157d Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:12:08 +0200 Subject: [PATCH 07/13] src\python_rucaptcha\capy_puzzle.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/capy_puzzle.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/capy_puzzle.py b/src/python_rucaptcha/capy_puzzle.py index e1de1e82f..75a9dfc73 100644 --- a/src/python_rucaptcha/capy_puzzle.py +++ b/src/python_rucaptcha/capy_puzzle.py @@ -103,11 +103,13 @@ def __init__( """ super().__init__(method=method, *args, **kwargs) - self.create_task_payload["task"].update({"websiteURL": websiteURL, "websiteKey": websiteKey}) + self.create_task_payload["task"].update({"websiteURL": websiteURL, + "websiteKey": websiteKey}) # check user params if method not in CapyPuzzleEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {CapyPuzzleEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {CapyPuzzleEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From 0b479af3c937bc6bada7823d3ab9499ae5d6a0dd Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:14:23 +0200 Subject: [PATCH 08/13] src\python_rucaptcha\datadome_captcha.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/datadome_captcha.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/datadome_captcha.py b/src/python_rucaptcha/datadome_captcha.py index 1da0bc877..095ee8643 100644 --- a/src/python_rucaptcha/datadome_captcha.py +++ b/src/python_rucaptcha/datadome_captcha.py @@ -20,8 +20,10 @@ def __init__( Args: rucaptcha_key: User API key websiteURL: Full URL of the captcha page - captchaUrl: The value of the `src` parameter for the `iframe` element containing the captcha on the page. - userAgent: User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents + captchaUrl: The value of the `src` parameter for the `iframe` element + containing the captcha on the page. + userAgent: User-Agent of your browser will be used to load the captcha. + Use only modern browser's User-Agents proxyType: Proxy type - `http`, `socks4`, `socks5` proxyAddress: Proxy IP address or hostname proxyPort: Proxy port From 62aadc460d1a836cd76468ac8ec0fc55ec17c30a Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:17:52 +0200 Subject: [PATCH 09/13] src\python_rucaptcha\amazon_waf.py line-too-long Made a readable too long line shorter --- src/python_rucaptcha/amazon_waf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_rucaptcha/amazon_waf.py b/src/python_rucaptcha/amazon_waf.py index eddc6623a..1b35957c4 100644 --- a/src/python_rucaptcha/amazon_waf.py +++ b/src/python_rucaptcha/amazon_waf.py @@ -77,7 +77,8 @@ def __init__( # check user params if method not in AmazonWAFCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {AmazonWAFCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {AmazonWAFCaptchaEnm.list_values()}") # insert `gt` param to payload self.create_task_payload["task"].update( { From 778ba7720c565b1f2f82d4d73c175efa33b22bfd Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:19:07 +0200 Subject: [PATCH 10/13] src\python_rucaptcha\cutcaptcha.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/cutcaptcha.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/cutcaptcha.py b/src/python_rucaptcha/cutcaptcha.py index 8be9a152a..7f1e3a7f9 100644 --- a/src/python_rucaptcha/cutcaptcha.py +++ b/src/python_rucaptcha/cutcaptcha.py @@ -81,11 +81,14 @@ def __init__( """ super().__init__(method=method, *args, **kwargs) - self.create_task_payload["task"].update({"websiteURL": websiteURL, "miseryKey": miseryKey, "apiKey": apiKey}) + self.create_task_payload["task"].update({"websiteURL": websiteURL, + "miseryKey": miseryKey, + "apiKey": apiKey}) # check user params if method not in CutCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {CutCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {CutCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From 9faab75d44f3f01d55fe18535b40d049b44bfa48 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:21:22 +0200 Subject: [PATCH 11/13] src\python_rucaptcha\hcaptcha.py line-too-long Made two readable too long lines shorter --- src/python_rucaptcha/hcaptcha.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python_rucaptcha/hcaptcha.py b/src/python_rucaptcha/hcaptcha.py index 25aadb8cc..22dcbfc21 100644 --- a/src/python_rucaptcha/hcaptcha.py +++ b/src/python_rucaptcha/hcaptcha.py @@ -76,11 +76,13 @@ def __init__( """ super().__init__(method=method, *args, **kwargs) - self.create_task_payload["task"].update({"websiteURL": websiteURL, "websiteKey": websiteKey}) + self.create_task_payload["task"].update({"websiteURL": websiteURL, + "websiteKey": websiteKey}) # check user params if method not in HCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {HCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {HCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From 5c927b9bc731fbdcad5da66d347e5712b60da0e1 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:23:16 +0200 Subject: [PATCH 12/13] src\python_rucaptcha\turnstile.py line-too-long Made a readable too long line shorter --- src/python_rucaptcha/turnstile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_rucaptcha/turnstile.py b/src/python_rucaptcha/turnstile.py index a1aa37863..cbf628882 100644 --- a/src/python_rucaptcha/turnstile.py +++ b/src/python_rucaptcha/turnstile.py @@ -81,7 +81,8 @@ def __init__( # check user params if method not in TurnstileCaptchaEnm.list_values(): - raise ValueError(f"Invalid method parameter set, available - {TurnstileCaptchaEnm.list_values()}") + raise ValueError( + f"Invalid method parameter set, available - {TurnstileCaptchaEnm.list_values()}") def captcha_handler(self, **kwargs) -> dict: """ From d3ed3f319c48f4e39cc197e612bd7e2646276807 Mon Sep 17 00:00:00 2001 From: evidencebp Date: Sun, 10 Nov 2024 15:28:31 +0200 Subject: [PATCH 13/13] docs\conf.py line-too-long Made a readable too long line shorter --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index bfe4c0ab0..aa8a3722d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,7 +32,9 @@ # -- Project information ----------------------------------------------------- project = "python-rucaptcha" -copyright = f"{date.today().year}, AndreiDrang; Release - {__version__}; Last update - {date.today()}" +copyright = (f"{date.today().year}, " + + f"AndreiDrang; Release - {__version__};" + + f"Last update - {date.today()}") author = "AndreiDrang" # -- General configuration ---------------------------------------------------