capmonstercloudclient 3.2.0__py3-none-any.whl → 3.3.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.
@@ -32,7 +32,9 @@ _instance_config = (
32
32
  ((ImpervaCustomTaskRequest,), getImpervaTimeouts),
33
33
  ((RecognitionComplexImageTaskRequest), getCITTimeouts),
34
34
  ((MTCaptchaRequest), getImage2TextTimeouts),
35
- ((YidunRequest), getImage2TextTimeouts),
35
+ ((YidunRequest), getYidunTimeouts),
36
+ ((TemuCustomTaskRequest), getTemuTimeouts),
37
+ ((ProsopoTaskRequest), getProsopoTimeouts),
36
38
  )
37
39
 
38
40
 
@@ -83,7 +85,9 @@ class CapMonsterClient:
83
85
  TurnstileRequest,
84
86
  RecognitionComplexImageTaskRequest,
85
87
  MTCaptchaRequest,
86
- YidunRequest],
88
+ YidunRequest,
89
+ TemuCustomTaskRequest,
90
+ ProsopoTaskRequest],
87
91
  ) -> Dict[str, str]:
88
92
  '''
89
93
  Non-blocking method for captcha solving.
@@ -116,7 +120,11 @@ class CapMonsterClient:
116
120
  BinanceTaskRequest,
117
121
  ImpervaCustomTaskRequest,
118
122
  TurnstileRequest,
119
- RecognitionComplexImageTaskRequest],
123
+ RecognitionComplexImageTaskRequest,
124
+ MTCaptchaRequest,
125
+ YidunRequest,
126
+ TemuCustomTaskRequest,
127
+ ProsopoTaskRequest],
120
128
  timeouts: GetResultTimeouts,
121
129
  ) -> Dict[str, str]:
122
130
 
@@ -52,3 +52,12 @@ def getImpervaTimeouts() -> GetResultTimeouts:
52
52
 
53
53
  def getCITTimeouts() -> GetResultTimeouts:
54
54
  return GetResultTimeouts(0.35, 0, 0.2, 10)
55
+
56
+ def getYidunTimeouts() -> GetResultTimeouts:
57
+ return GetResultTimeouts(1, 10, 3, 180)
58
+
59
+ def getProsopoTimeouts() -> GetResultTimeouts:
60
+ return GetResultTimeouts(1, 10, 3, 180)
61
+
62
+ def getTemuTimeouts() -> GetResultTimeouts:
63
+ return GetResultTimeouts(1, 10, 3, 180)
@@ -0,0 +1,23 @@
1
+ from typing import Dict, Union
2
+ from pydantic import Field
3
+ from .baseRequestWithProxy import BaseRequestWithProxy
4
+
5
+
6
+ class ProsopoTaskRequest(BaseRequestWithProxy):
7
+ type: str = Field(default="ProsopoTask")
8
+ websiteUrl: str
9
+ websiteKey: str
10
+
11
+ def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
12
+ task = {}
13
+ task["type"] = self.type
14
+ task["websiteURL"] = self.websiteUrl
15
+ task["websiteKey"] = self.websiteKey
16
+ if self.proxy:
17
+ task["proxyType"] = self.proxy.proxyType
18
+ task["proxyAddress"] = self.proxy.proxyAddress
19
+ task["proxyPort"] = self.proxy.proxyPort
20
+ task["proxyLogin"] = self.proxy.proxyLogin
21
+ task["proxyPassword"] = self.proxy.proxyPassword
22
+
23
+ return task
@@ -0,0 +1,35 @@
1
+ from typing import Dict, Union
2
+ from pydantic import Field, validator
3
+
4
+ from .CustomTaskRequestBase import CustomTaskRequestBase
5
+
6
+ class TemuCustomTaskRequest(CustomTaskRequestBase):
7
+ captchaClass: str = Field(default='Temu')
8
+ metadata: Dict[str, str]
9
+
10
+ @validator('metadata')
11
+ def validate_metadata(cls, value):
12
+ if value.get('cookie') is None:
13
+ raise TypeError(f'Expect that cookie will be defined.')
14
+ else:
15
+ if not isinstance(value.get('cookie'), str):
16
+ raise TypeError(f'Expect that cookie will be str.')
17
+ if not set(value.keys()).issubset(set(["cookie"])):
18
+ raise TypeError(f'Allowed keys for metadata are "cookie"')
19
+ return value
20
+
21
+ def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
22
+ task = {}
23
+ task['type'] = self.type
24
+ task['class'] = self.captchaClass
25
+ task['websiteURL'] = self.websiteUrl
26
+ task['metadata'] = self.metadata
27
+ if self.proxy:
28
+ task['proxyType'] = self.proxy.proxyType
29
+ task['proxyAddress'] = self.proxy.proxyAddress
30
+ task['proxyPort'] = self.proxy.proxyPort
31
+ task['proxyLogin'] = self.proxy.proxyLogin
32
+ task['proxyPassword'] = self.proxy.proxyPassword
33
+ if self.userAgent is not None:
34
+ task['userAgent'] = self.userAgent
35
+ return task
@@ -20,6 +20,8 @@ from .ImpervaCustomTaskRequest import ImpervaCustomTaskRequest
20
20
  from .RecognitionComplexImageTaskRequest import RecognitionComplexImageTaskRequest
21
21
  from .MTCaptchaRequest import MTCaptchaRequest
22
22
  from .YidunRequest import YidunRequest
23
+ from .ProsopoTaskRequest import ProsopoTaskRequest
24
+ from .TemuCustomTaskRequest import TemuCustomTaskRequest
23
25
  from .proxy_info import ProxyInfo
24
26
 
25
27
 
@@ -35,4 +37,9 @@ REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2Request', 'RecaptchaV3Pro
35
37
  'BinanceTaskRequest',
36
38
  'ImpervaCustomTaskRequest',
37
39
  'TurnstileRequest',
38
- 'RecognitionComplexImageTaskRequest']
40
+ 'RecognitionComplexImageTaskRequest',
41
+ 'MTCaptchaRequest',
42
+ 'YidunRequest',
43
+ 'ProsopoTaskRequest',
44
+ 'TemuCustomTaskRequest'
45
+ ]
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.3.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: capmonstercloudclient
3
- Version: 3.2.0
3
+ Version: 3.3.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
@@ -1,12 +1,12 @@
1
- capmonstercloudclient/CapMonsterCloudClient.py,sha256=0YRJepYoyD2P_nwltTlrkD_1l69tc84iScycw-bFY_M,9326
2
- capmonstercloudclient/GetResultTimeouts.py,sha256=wgCXitjTsC6BYP3xjLqpW58xS55hsbqcf28IylxRS1E,1661
1
+ capmonstercloudclient/CapMonsterCloudClient.py,sha256=1OzypqFZMw9cuzDJYXEo8W6QaxW8KDRzJjsKkQI9WiU,9801
2
+ capmonstercloudclient/GetResultTimeouts.py,sha256=d_uecjbwGoaTutuK9eEQ2gy53bKkCtcpNFBs3lV3iyI,1932
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=ojyOaxZvgxpbs8G94LZrGFxuPlkFKS6Kgq_q-EF6VHY,5
9
+ capmonstercloudclient/version.txt,sha256=bSYhZybiZv8dr1sYDsdjRHE6FmMyKeNmBtwSrNRlAyw,5
10
10
  capmonstercloudclient/requests/AmazonWafRequest.py,sha256=8SrbFTcZg3YI-Fac19Ap1iVT3n3mFBFKB38K1Y9QrWo,1195
11
11
  capmonstercloudclient/requests/BasiliskCustomTaskRequest.py,sha256=GJ7OCsdF-xlnsV6kOI3fdb8C7CyLE7Kr5W4oK_nGn18,913
12
12
  capmonstercloudclient/requests/BinanceTaskRequest.py,sha256=9kD9y_4hZYXKOj2AYoiv--Z0De0Y7JChF9X09snMbZs,1013
@@ -21,21 +21,23 @@ capmonstercloudclient/requests/HcaptchaRequest.py,sha256=sa0FRLf-H-9MWlFrowMNED1
21
21
  capmonstercloudclient/requests/ImageToTextRequest.py,sha256=1F7Gzq0qTuxjbl9XfFbszQUHNG7W5PthuiJBAO_VEug,2481
22
22
  capmonstercloudclient/requests/ImpervaCustomTaskRequest.py,sha256=YUY_wC8yv16rZGK_VTCbqzj1rMxbUeJrxAE-7IT2AYY,1777
23
23
  capmonstercloudclient/requests/MTCaptchaRequest.py,sha256=dn2OxdB5Ro8c01Z4NplHKOVbYsA_o2hH8QCNFVLIzfY,1212
24
+ capmonstercloudclient/requests/ProsopoTaskRequest.py,sha256=8FjE2tQmxFS6mEpeK4wiws1-E60fG-XMos_kxc6rNOU,778
24
25
  capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=v7cqgTF5L2ADYHoskveB8v2h6cW68Av60tH7ek3hWNg,3281
25
26
  capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py,sha256=TiIV0-SWLUT4mwK8ZzChL3FCZwaizzVsZhzZo0KRgfk,1121
26
27
  capmonstercloudclient/requests/RecaptchaV2Request.py,sha256=wq9IFNehhcVZ-bDzu1Yfq1oD_4I4KbtwRdUwwNaQNm8,1219
27
28
  capmonstercloudclient/requests/RecaptchaV3ProxylessRequest.py,sha256=0IYCgNruZrVr0L7E4dfHE_Pv8DimkrH4PBkEPEv7dxw,1078
28
29
  capmonstercloudclient/requests/RecognitionComplexImageTaskRequest.py,sha256=TzWoKqEAOrgll1LlEFTzB_7dbOKJywRScZCpLUgSMS8,1970
30
+ capmonstercloudclient/requests/TemuCustomTaskRequest.py,sha256=ltYn_TdNTwo5FQbFqmUVycnZuJmU6tMFpBZ-4CBRL-c,1373
29
31
  capmonstercloudclient/requests/TenDiCustomTaskRequest.py,sha256=OIhLd_ODD6MsvBl6wSVcOHuBn0rv-Cg4sEFd6Y0zrY4,903
30
32
  capmonstercloudclient/requests/TurnstileRequest.py,sha256=Z15aoC6IhUCBc1CUAlEd6tpfwk4UK4b-EzL1HbHQqw4,3510
31
33
  capmonstercloudclient/requests/YidunRequest.py,sha256=QwHal52oTAzLJOvDVfSqyb1hKvhbcgABdFlw9Il_Y1w,917
32
- capmonstercloudclient/requests/__init__.py,sha256=M80ammbzgrQMl44UUXDa0YlUcsnnN2ncUYM3SeEitHI,1944
34
+ capmonstercloudclient/requests/__init__.py,sha256=TC816eAQM3HbNlktThQkMXNQzzK-NUc5WuXm2tMEOi8,2196
33
35
  capmonstercloudclient/requests/baseRequest.py,sha256=wHYDtEoJbAiJQDFOKWSezLvlxTLO9LCD5v7t3dvfgSg,317
34
36
  capmonstercloudclient/requests/baseRequestWithProxy.py,sha256=RwF1FXH19T9IyR4bbj-fC73huAgKewtJMJy2IvWurpA,230
35
37
  capmonstercloudclient/requests/enums.py,sha256=itJ95OEzwous9zOe4n411w5LeBw4yCpCCTMomlT3LU0,1000
36
38
  capmonstercloudclient/requests/proxy_info.py,sha256=ctmxvykMflsym-snO449t9mOZ1jxpUFTnxcI8koACUw,678
37
- capmonstercloudclient-3.2.0.dist-info/licenses/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
38
- capmonstercloudclient-3.2.0.dist-info/METADATA,sha256=MXa6d5fCzH3-Q09lnN4nr1WBav0wzkaa8WGS-qpcu5I,5462
39
- capmonstercloudclient-3.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- capmonstercloudclient-3.2.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
41
- capmonstercloudclient-3.2.0.dist-info/RECORD,,
39
+ capmonstercloudclient-3.3.0.dist-info/licenses/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
40
+ capmonstercloudclient-3.3.0.dist-info/METADATA,sha256=RMQdKYXzG88Ks_YBnSoCmqjsA4V5LPEA-dsfOJROAkE,5462
41
+ capmonstercloudclient-3.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
42
+ capmonstercloudclient-3.3.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
43
+ capmonstercloudclient-3.3.0.dist-info/RECORD,,