capmonstercloudclient 1.6.0__py3-none-any.whl → 2.0.0__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.
@@ -29,7 +29,8 @@ _instance_config = (
29
29
  ((BasiliskCustomTaskRequest, BasiliskCustomTaskProxylessRequest), getBasiliskTimeouts),
30
30
  ((AmazonWafRequest, AmazonWafProxylessRequest), getAmazonWafTimeouts),
31
31
  ((BinanceTaskRequest, BinanceTaskProxylessRequest), getBinanceTimeouts),
32
- ((ImpervaCustomTaskRequest, ImpervaCustomTaskProxylessRequest), getImpervaTimeouts)
32
+ ((ImpervaCustomTaskRequest, ImpervaCustomTaskProxylessRequest), getImpervaTimeouts),
33
+ ((RecognitionComplexImageTaskRequest), getCITTimeouts)
33
34
  )
34
35
 
35
36
 
@@ -82,7 +83,8 @@ class CapMonsterClient:
82
83
  BinanceTaskRequest,
83
84
  BinanceTaskProxylessRequest,
84
85
  ImpervaCustomTaskRequest,
85
- ImpervaCustomTaskProxylessRequest],
86
+ ImpervaCustomTaskProxylessRequest,
87
+ RecognitionComplexImageTaskRequest],
86
88
  ) -> Dict[str, str]:
87
89
  '''
88
90
  Non-blocking method for captcha solving.
@@ -49,3 +49,6 @@ def getBinanceTimeouts() -> GetResultTimeouts:
49
49
 
50
50
  def getImpervaTimeouts() -> GetResultTimeouts:
51
51
  return GetResultTimeouts(1, 0, 1, 20)
52
+
53
+ def getCITTimeouts() -> GetResultTimeouts:
54
+ return GetResultTimeouts(0.35, 0, 0.2, 10)
@@ -71,7 +71,7 @@ class RecaptchaComplexImageTaskRequest(ComplexImageTaskRequestBase):
71
71
 
72
72
  if self.websiteUrl is not None:
73
73
  task["websiteUrl"] = self.websiteUrl
74
-
74
+
75
75
  return task
76
76
 
77
77
 
@@ -0,0 +1,45 @@
1
+ from typing import Optional, List, Dict, Union
2
+ from pydantic import validator
3
+ from .ComplexImageTaskBase import ComplexImageTaskRequestBase
4
+ from ..exceptions import NumbersImagesErrors, ZeroImagesErrors, TaskNotDefinedError
5
+
6
+
7
+ class RecognitionComplexImageTaskRequest(ComplexImageTaskRequestBase):
8
+ captchaClass: str = 'recognition'
9
+ metadata: Dict[str, str]
10
+
11
+ @validator('metadata')
12
+ def validate_metadata(cls, value):
13
+ if value.get('Task') is None:
14
+ raise TaskNotDefinedError(f'Expect that Task will be defined.')
15
+ else:
16
+ if not isinstance(value.get('Task'), str):
17
+ raise TypeError(f'Expect that Task will be str.')
18
+ if not set(value.keys()).issubset(set(["Task", "TaskArgument"])):
19
+ raise TypeError(f'Allowed keys for metadata are "Task" and "TaskArgument"')
20
+ return value
21
+
22
+ @validator('imagesBase64')
23
+ def validate_images_array(cls, value):
24
+ if value is not None:
25
+ if not isinstance(value, (list, tuple)):
26
+ raise TypeError(f'Expect that type imagesBase64 array will be <list> or <tuple>, got {type(value)}')
27
+ elif not len(value):
28
+ raise ZeroImagesErrors(f'At least one image base64 expected, got {len(value)}')
29
+ # Check for each element type
30
+ contain_types = [isinstance(x, str) for x in value]
31
+ if not all(contain_types):
32
+ raise TypeError(f'Next images from imagesBase64 array are not string: {contain_types}')
33
+ else:
34
+ raise ZeroImagesErrors(f'At least one image base64 expected, got {len(value)}')
35
+ return value
36
+
37
+ def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
38
+ task = {}
39
+ task['type'] = self.taskType
40
+ task['class'] = self.captchaClass
41
+ task['imagesBase64'] = self.imagesBase64
42
+ task['metadata'] = self.metadata
43
+ if self.userAgent is not None:
44
+ task['userAgent'] = self.userAgent
45
+ return task
@@ -28,6 +28,7 @@ from .BinanceTaskRequest import BinanceTaskRequest
28
28
  from .BinanceTaskProxylessRequest import BinanceTaskProxylessRequest
29
29
  from .ImpervaCustomTaskRequest import ImpervaCustomTaskRequest
30
30
  from .ImpervaCustomTaskProxylessRequest import ImpervaCustomTaskProxylessRequest
31
+ from .RecognitionComplexImageTaskRequest import RecognitionComplexImageTaskRequest
31
32
 
32
33
 
33
34
  REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2EnterpriseProxylessRequest',
@@ -38,4 +39,4 @@ REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2EnterpriseProxylessReques
38
39
  'TenDiCustomTaskRequest', 'TenDiCustomTaskProxylessRequest', 'BasiliskCustomTaskRequest',
39
40
  'BasiliskCustomTaskProxylessRequest', 'AmazonWafRequest', 'AmazonWafProxylessRequest',
40
41
  'BinanceTaskRequest', 'BinanceTaskProxylessRequest', 'ImpervaCustomTaskProxylessRequest',
41
- 'ImpervaCustomTaskRequest']
42
+ 'ImpervaCustomTaskRequest', 'RecognitionComplexImageTaskRequest']
@@ -1 +1 @@
1
- 1.6.0
1
+ 2.0.0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: capmonstercloudclient
3
- Version: 1.6.0
3
+ Version: 2.0.0
4
4
  Summary: Official CapMonsterCloud Client: https://capmonster.cloud/
5
5
  Home-page: https://github.com/ZennoLab/capmonstercloud-client-python
6
6
  Author: Andrey Ilyin
@@ -33,8 +33,24 @@ Classifier: Operating System :: MacOS
33
33
  Requires-Python: >=3.6
34
34
  Description-Content-Type: text/markdown
35
35
  License-File: LICENSE
36
- Requires-Dist: aiohttp>=3.7.4
37
- Requires-Dist: pydantic==2.1.*
36
+ Requires-Dist: aiohappyeyeballs==2.4.4; python_version >= "3.9" and python_version <= "3.13"
37
+ Requires-Dist: aiohttp==3.11.10; python_version >= "3.9" and python_version <= "3.13"
38
+ Requires-Dist: aiosignal==1.3.1; python_version >= "3.9" and python_version <= "3.13"
39
+ Requires-Dist: annotated-types==0.7.0; python_version >= "3.9" and python_version <= "3.13"
40
+ Requires-Dist: async-timeout==5.0.1; python_version >= "3.9" and python_version <= "3.11"
41
+ Requires-Dist: attrs==24.2.0; python_version >= "3.9" and python_version <= "3.13"
42
+ Requires-Dist: frozenlist==1.5.0; python_version >= "3.9" and python_version <= "3.13"
43
+ Requires-Dist: idna==3.10; python_version >= "3.9" and python_version <= "3.13"
44
+ Requires-Dist: multidict==6.1.0; python_version >= "3.9" and python_version <= "3.13"
45
+ Requires-Dist: propcache==0.2.1; python_version >= "3.9" and python_version <= "3.13"
46
+ Requires-Dist: pydantic-core==2.27.1; python_version >= "3.9" and python_version <= "3.13"
47
+ Requires-Dist: pydantic==2.10.3; python_version >= "3.9" and python_version <= "3.13"
48
+ Requires-Dist: typing-extensions==4.12.2; python_version >= "3.9" and python_version <= "3.13"
49
+ Requires-Dist: yarl==1.18.3; python_version >= "3.9" and python_version <= "3.13"
50
+ Requires-Dist: aiohttp==3.7.4; python_version >= "3.6" and python_version <= "3.8"
51
+ Requires-Dist: pydantic==2.10.3; python_version >= "3.8" and python_version < "3.9"
52
+ Requires-Dist: pydantic==2.5.3; python_version >= "3.7" and python_version < "3.8"
53
+ Requires-Dist: pydantic==2.1.*; python_version < "3.7"
38
54
  Dynamic: author
39
55
  Dynamic: author-email
40
56
  Dynamic: classifier
@@ -43,6 +59,7 @@ Dynamic: description-content-type
43
59
  Dynamic: home-page
44
60
  Dynamic: keywords
45
61
  Dynamic: license
62
+ Dynamic: license-file
46
63
  Dynamic: requires-dist
47
64
  Dynamic: requires-python
48
65
  Dynamic: summary
@@ -1,12 +1,12 @@
1
- capmonstercloudclient/CapMonsterCloudClient.py,sha256=M_o11eAs_Hcdg36QA77V-AE6V-IrKXn12gpfpXkBUXY,9964
2
- capmonstercloudclient/GetResultTimeouts.py,sha256=SqQlQwl0id5y8SwN9F4ug8CgvQaLV9hWxWjFiksr32A,1570
1
+ capmonstercloudclient/CapMonsterCloudClient.py,sha256=447XcFb5JXdPGBFb7nc_pP_yrHgV0y0Ac6mApyMRBxM,10109
2
+ capmonstercloudclient/GetResultTimeouts.py,sha256=wgCXitjTsC6BYP3xjLqpW58xS55hsbqcf28IylxRS1E,1661
3
3
  capmonstercloudclient/__init__.py,sha256=XkfS_v1jZUx7HTUhdi-5uiZhvjvd9aLvt31jXXpVxeA,92
4
4
  capmonstercloudclient/captchaResult.py,sha256=qBRmadO9n6DMnG-IwJSzZEt54Z5OAXvWIC5Jvzd7OfI,314
5
5
  capmonstercloudclient/clientOptions.py,sha256=kd2CXnmz2_crZd85SoOHOjp1zBklEbu9OWDpk-JfBf4,895
6
6
  capmonstercloudclient/exceptions.py,sha256=9iTzO0ymBo7eAJwv7qtoPZTmb4yaQ6Fvi69VqBXTcwk,925
7
7
  capmonstercloudclient/requestController.py,sha256=9t31zNN4z1UBw4Q0N9ZIy47CwSQl2VaxD1eqDTDIr9w,497
8
8
  capmonstercloudclient/utils.py,sha256=hP090ddzDCLknr5wGCR7sIALDbOtWbiSzgZPvPnDC3c,609
9
- capmonstercloudclient/version.txt,sha256=ViNosgpkvpVlG7gka3Qg9_zlVTjf-Zmu-qeGYqFNDTk,5
9
+ capmonstercloudclient/version.txt,sha256=8iq9Z3OrIyhpMhrUseR6wMkI_r9POivRDIBmFA90EmE,5
10
10
  capmonstercloudclient/requests/AmazonWafProxylessRequest.py,sha256=lgNC-03ccOsWZJM9xuLChaWAgNkOpMz4jRmhsK6yi58,753
11
11
  capmonstercloudclient/requests/AmazonWafRequest.py,sha256=vXw1AcTStr3NPFMSTUxi0ZuQ9ICEhwfhZ3m5BhSc6Jw,986
12
12
  capmonstercloudclient/requests/AmazonWafRequestBase.py,sha256=Ie4Vv6OZpFPvy6gQyuwsNMGKHEI4qNFa6Z5RK3KUqEw,308
@@ -36,7 +36,7 @@ capmonstercloudclient/requests/ImageToTextRequest.py,sha256=iubmsWXBwpQKFSoqL2Yu
36
36
  capmonstercloudclient/requests/ImpervaCustomTaskProxylessRequest.py,sha256=YTCLEvDZkIko9inkc4JLZBNlxPnL3CToV7o5kwFB-Dk,1498
37
37
  capmonstercloudclient/requests/ImpervaCustomTaskRequest.py,sha256=zw_dpvp5Yy2D5LeFZYSpuxZgIaSnpSibfIgs-bQzR_8,1765
38
38
  capmonstercloudclient/requests/ImpervaCustomTaskRequestBase.py,sha256=se-LV7B-WSZSBlPXOFUfHWlpWwkjCPul9dCN6eVJ6oM,269
39
- capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=fhT5tJo8__Ffc0sr4v0SxG0_tvqQt4A301CdM0zA8PI,3299
39
+ capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=DW7FO14Q8da1AdDEvzfFcBAILqzesbARzi7cgwI742Q,3291
40
40
  capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py,sha256=4mD8Lv52K9rhEzwXEBefnN0sN8TGwOsGvoFVrU7T44A,965
41
41
  capmonstercloudclient/requests/RecaptchaV2EnterpriseProxylessRequest.py,sha256=2B8tJXDwb_L-UHCJ0jz_ut116HzWk1EuDQBMfPOxSoc,718
42
42
  capmonstercloudclient/requests/RecaptchaV2EnterpriseRequestBase.py,sha256=WVw4HZhsKlUwC-npXnZKUHNvcJWgWtK8ah0iqNg0oWw,297
@@ -44,18 +44,19 @@ capmonstercloudclient/requests/RecaptchaV2ProxylessRequest.py,sha256=rfrvXjOuy09
44
44
  capmonstercloudclient/requests/RecaptchaV2Request.py,sha256=n2xhE9CH255nGChg1bc2cnQqTodehkUO9NZTPrJXcO8,995
45
45
  capmonstercloudclient/requests/RecaptchaV2RequestBase.py,sha256=IMjBmB8y7KwZ-CPkbYC48w2ADoEDiEpoK4Kzd8_Wbo8,329
46
46
  capmonstercloudclient/requests/RecaptchaV3ProxylessRequest.py,sha256=0IYCgNruZrVr0L7E4dfHE_Pv8DimkrH4PBkEPEv7dxw,1078
47
+ capmonstercloudclient/requests/RecognitionComplexImageTaskRequest.py,sha256=p78sKK8-_J80lw5jk5cfB8sv85Kv8muTr7GEayDZbq8,2007
47
48
  capmonstercloudclient/requests/TenDiCustomTaskProxylessRequest.py,sha256=_mxYiUwsjbSaQ-1J4DKjNbho8HIQCwwxW1LDQRU7y2I,561
48
49
  capmonstercloudclient/requests/TenDiCustomTaskRequest.py,sha256=jWgGQaidkQHuJ8DeMMokQwlCKpI-5fhjoRQKflb6I6E,828
49
50
  capmonstercloudclient/requests/TenDiCustomTaskRequestBase.py,sha256=3bnONuD0u9Qs2qZ6XCTV3G8tOqHQIgTm-sG4azHTikQ,361
50
51
  capmonstercloudclient/requests/TurnstileProxylessRequest.py,sha256=ZRiBYYudP5z8J79YjjMf5PSgR9q1eWTCb1TWWfnIn10,342
51
52
  capmonstercloudclient/requests/TurnstileRequest.py,sha256=xPH5EyXwvw3apI1YlUEcTktGP3wxkaRAWKpP6uqOguI,378
52
53
  capmonstercloudclient/requests/TurnstileRequestBase.py,sha256=TRXbxmbZKM9449ZUni0g3ZdLIX4bFmh2PWdaLvNWlhc,2008
53
- capmonstercloudclient/requests/__init__.py,sha256=4Fd7Q-bxniIXF5sc4RIIsGXOIEnrvdtC8hwaOzZjJz0,2694
54
+ capmonstercloudclient/requests/__init__.py,sha256=TcN1RyvVIASZhCu_2YTD-RHFT2OiVQ6mPo8Yh_K0UUw,2815
54
55
  capmonstercloudclient/requests/baseRequest.py,sha256=oVOtKdCfVhxQ9x4qDkIc1D_-q3B08hNQeUKrBLwkjaM,279
55
56
  capmonstercloudclient/requests/enums.py,sha256=itJ95OEzwous9zOe4n411w5LeBw4yCpCCTMomlT3LU0,1000
56
57
  capmonstercloudclient/requests/proxy_info.py,sha256=ctmxvykMflsym-snO449t9mOZ1jxpUFTnxcI8koACUw,678
57
- capmonstercloudclient-1.6.0.dist-info/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
58
- capmonstercloudclient-1.6.0.dist-info/METADATA,sha256=kpesZFnlX9xJ7G-EqxSwZ0iMufFIXUWScqnSzwGvWSo,3973
59
- capmonstercloudclient-1.6.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
60
- capmonstercloudclient-1.6.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
61
- capmonstercloudclient-1.6.0.dist-info/RECORD,,
58
+ capmonstercloudclient-2.0.0.dist-info/licenses/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
59
+ capmonstercloudclient-2.0.0.dist-info/METADATA,sha256=TCLLQUI3hNZH-Ww8iOuqa89qhiuZQy6CrZLx_0Y2AoM,5462
60
+ capmonstercloudclient-2.0.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
61
+ capmonstercloudclient-2.0.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
62
+ capmonstercloudclient-2.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5