python-rucaptcha 6.8.0__py3-none-any.whl → 6.8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_rucaptcha/__version__.py +1 -1
- python_rucaptcha/core/base.py +2 -2
- python_rucaptcha/core/result_handler.py +2 -2
- python_rucaptcha/vk_captcha.py +8 -2
- {python_rucaptcha-6.8.0.dist-info → python_rucaptcha-6.8.2.dist-info}/METADATA +3 -2
- {python_rucaptcha-6.8.0.dist-info → python_rucaptcha-6.8.2.dist-info}/RECORD +9 -9
- {python_rucaptcha-6.8.0.dist-info → python_rucaptcha-6.8.2.dist-info}/WHEEL +1 -1
- {python_rucaptcha-6.8.0.dist-info → python_rucaptcha-6.8.2.dist-info}/licenses/LICENSE +0 -0
- {python_rucaptcha-6.8.0.dist-info → python_rucaptcha-6.8.2.dist-info}/top_level.txt +0 -0
python_rucaptcha/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "6.8.
|
|
1
|
+
__version__ = "6.8.2"
|
python_rucaptcha/core/base.py
CHANGED
|
@@ -104,7 +104,7 @@ class BaseCaptcha:
|
|
|
104
104
|
return response.to_dict()
|
|
105
105
|
except Exception as error:
|
|
106
106
|
self.result.errorId = 12
|
|
107
|
-
self.result.errorCode =
|
|
107
|
+
self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
108
108
|
self.result.errorDescription = str(error)
|
|
109
109
|
return self.result.to_dict()
|
|
110
110
|
|
|
@@ -157,7 +157,7 @@ class BaseCaptcha:
|
|
|
157
157
|
return response.to_dict()
|
|
158
158
|
except Exception as error:
|
|
159
159
|
self.result.errorId = 12
|
|
160
|
-
self.result.errorCode =
|
|
160
|
+
self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
161
161
|
self.result.errorDescription = str(error)
|
|
162
162
|
return self.result.to_dict()
|
|
163
163
|
|
|
@@ -55,7 +55,7 @@ def get_sync_result(
|
|
|
55
55
|
except Exception as error:
|
|
56
56
|
response_ser.status = "failed"
|
|
57
57
|
response_ser.errorId = 12
|
|
58
|
-
response_ser.errorCode = "
|
|
58
|
+
response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
59
59
|
response_ser.errorDescription = str(error)
|
|
60
60
|
return response_ser.to_dict()
|
|
61
61
|
|
|
@@ -110,6 +110,6 @@ async def get_async_result(
|
|
|
110
110
|
except Exception as error:
|
|
111
111
|
response_ser.status = "failed"
|
|
112
112
|
response_ser.errorId = 12
|
|
113
|
-
response_ser.errorCode = "
|
|
113
|
+
response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
114
114
|
response_ser.errorDescription = str(error)
|
|
115
115
|
return response_ser.to_dict()
|
python_rucaptcha/vk_captcha.py
CHANGED
|
@@ -7,7 +7,7 @@ from .core.enums import VKCaptchaEnm, SaveFormatsEnm
|
|
|
7
7
|
class VKCaptcha(BaseCaptcha):
|
|
8
8
|
def __init__(
|
|
9
9
|
self,
|
|
10
|
-
method: Union[str, VKCaptchaEnm] =
|
|
10
|
+
method: Union[str, VKCaptchaEnm, None] = None,
|
|
11
11
|
redirectUri: Optional[str] = None,
|
|
12
12
|
userAgent: Optional[str] = None,
|
|
13
13
|
proxyType: Optional[str] = None,
|
|
@@ -113,6 +113,12 @@ class VKCaptcha(BaseCaptcha):
|
|
|
113
113
|
|
|
114
114
|
https://rucaptcha.com/api-docs/vk-captcha
|
|
115
115
|
"""
|
|
116
|
+
# VKCaptchaTask is the default task type. Its required fields are only
|
|
117
|
+
# validated when VKCaptchaTask is selected explicitly via ``method``.
|
|
118
|
+
method_passed = method is not None
|
|
119
|
+
if method is None:
|
|
120
|
+
method = VKCaptchaEnm.VKCaptchaTask
|
|
121
|
+
|
|
116
122
|
super().__init__(method=method, *args, **kwargs)
|
|
117
123
|
|
|
118
124
|
if method not in VKCaptchaEnm.list_values():
|
|
@@ -123,7 +129,7 @@ class VKCaptcha(BaseCaptcha):
|
|
|
123
129
|
self.img_path = img_path
|
|
124
130
|
|
|
125
131
|
if method == VKCaptchaEnm.VKCaptchaTask:
|
|
126
|
-
if not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
|
|
132
|
+
if method_passed and not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
|
|
127
133
|
raise ValueError(
|
|
128
134
|
"redirectUri, userAgent, proxyType, proxyAddress, "
|
|
129
135
|
"and proxyPort are required for VKCaptchaTask"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-rucaptcha
|
|
3
|
-
Version: 6.8.
|
|
3
|
+
Version: 6.8.2
|
|
4
4
|
Summary: Python 3.9+ RuCaptcha library with AIO module.
|
|
5
5
|
Author-email: AndreiDrang <python-captcha@pm.me>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
23
|
Classifier: Framework :: AsyncIO
|
|
23
24
|
Classifier: Operating System :: Unix
|
|
24
25
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
|
|
|
28
29
|
License-File: LICENSE
|
|
29
30
|
Requires-Dist: requests>=2.21.0
|
|
30
31
|
Requires-Dist: aiohttp>=3.9.2
|
|
31
|
-
Requires-Dist: msgspec<0.
|
|
32
|
+
Requires-Dist: msgspec<0.23,>=0.18
|
|
32
33
|
Requires-Dist: tenacity<10,>=8
|
|
33
34
|
Dynamic: license-file
|
|
34
35
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
python_rucaptcha/__init__.py,sha256=odkQWtwx2RgIjD8pw2ZF-KR-5nL0Yu2Wn7Mu2YdBrSk,61
|
|
2
|
-
python_rucaptcha/__version__.py,sha256=
|
|
2
|
+
python_rucaptcha/__version__.py,sha256=vyTIfGYUESMtwCtlc4spIbt0INj0WG4WzbyZCmSa_0Y,22
|
|
3
3
|
python_rucaptcha/alibaba_captcha.py,sha256=YiZ3ACv_UTf-RvqlaOyKKHvHp30xQ8YdHnkjIpQ32LE,3768
|
|
4
4
|
python_rucaptcha/altcha_captcha.py,sha256=ZZdNUWikyC5LTGCSVnqSrmmgw6TSfRcp44CagBBOHsE,5146
|
|
5
5
|
python_rucaptcha/amazon_waf.py,sha256=psEg-sym8xQlMPPto1ND_HE0vGV_SRRrDnsKuEbbxNA,3625
|
|
@@ -35,21 +35,21 @@ python_rucaptcha/tencent.py,sha256=f7lnRBUl-X5rL2FNRnrlh9ITRCcerTaS6XGUXnQdnOA,3
|
|
|
35
35
|
python_rucaptcha/text_captcha.py,sha256=lZDPwTgpMLvqvfjPbT-uNuNu6JRdWTEE9qfjnRQ5y-A,3708
|
|
36
36
|
python_rucaptcha/tspd_captcha.py,sha256=yk33_IOKenHFxnVC7dKGaRG2bcS_Q67kO-qhDc_XnZg,2679
|
|
37
37
|
python_rucaptcha/turnstile.py,sha256=VpmYGYJoRVX6NHipO6-g2U5EpwxZToAZRmULj4ReDD0,3686
|
|
38
|
-
python_rucaptcha/vk_captcha.py,sha256=
|
|
38
|
+
python_rucaptcha/vk_captcha.py,sha256=mgKYMwsUFuTWatLpOR9uxlUkOG5qSn3FPvjFyWkh1o0,8775
|
|
39
39
|
python_rucaptcha/yandex_smart_captcha.py,sha256=V21WQdDND0r0FAmYN9zYpBeKuna20PsdMsqgCuGGlPI,10237
|
|
40
40
|
python_rucaptcha/yidun_captcha.py,sha256=aLpddgc-beVe_x0Ts028Jgg1uk_DQhSQGU7fh_dYkVM,6612
|
|
41
41
|
python_rucaptcha/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
|
-
python_rucaptcha/core/base.py,sha256=
|
|
42
|
+
python_rucaptcha/core/base.py,sha256=YK4xs_BOUfihJbdK4_eCddKwezsapmN7CFHAYjWO5Ww,11694
|
|
43
43
|
python_rucaptcha/core/captchaai.py,sha256=5Kh2dGfTL_3tMdBH3khq38H3q9KqLud8szaSwhL01Aw,23764
|
|
44
44
|
python_rucaptcha/core/config.py,sha256=ocoPeMXfn-2iqaqcjewZWfRpu73D5dY2AL2zqXVrG9Q,613
|
|
45
45
|
python_rucaptcha/core/enums.py,sha256=KJIEoXEQEzxEidQ-E728zNzaAvwOLYlZCFQovcWxIZg,5156
|
|
46
|
-
python_rucaptcha/core/result_handler.py,sha256=
|
|
46
|
+
python_rucaptcha/core/result_handler.py,sha256=3QjdaZlAf7XOLNEtwWDMA99TQXZSh6W6JiGPxxVBZOY,5100
|
|
47
47
|
python_rucaptcha/core/serializer.py,sha256=TFYkV6Feq_FTo7NqTpTo_jzKj2aGYKg5CztMTTHouwQ,2970
|
|
48
48
|
python_rucaptcha/core/data/__init__.py,sha256=_DueAqmAAsgx7F2zYG_3_UoR8oJRNg9Xu4Tczn0f0bo,44
|
|
49
49
|
python_rucaptcha/core/data/captchaai_legacy_profiles.json,sha256=GkNDw4q9hTnkoL0XpsWh0oVzkBwSRVEXigRg7f05MN0,2878
|
|
50
50
|
python_rucaptcha/core/data/captchaai_profiles.json,sha256=bzxmOTWr-pzVeE2NpdXZRywLs20bGcaGY7HYszqQ5qY,3097
|
|
51
|
-
python_rucaptcha-6.8.
|
|
52
|
-
python_rucaptcha-6.8.
|
|
53
|
-
python_rucaptcha-6.8.
|
|
54
|
-
python_rucaptcha-6.8.
|
|
55
|
-
python_rucaptcha-6.8.
|
|
51
|
+
python_rucaptcha-6.8.2.dist-info/licenses/LICENSE,sha256=ZQeZG4IrO4YywdTal32gqyyrwdMlrMa3EwJCbgM8b2k,1063
|
|
52
|
+
python_rucaptcha-6.8.2.dist-info/METADATA,sha256=1ekQicmY9S-112zg8EVfJ8bHxGOGqb9mR4OKqO76DVA,8708
|
|
53
|
+
python_rucaptcha-6.8.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
54
|
+
python_rucaptcha-6.8.2.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
|
|
55
|
+
python_rucaptcha-6.8.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|