capmonstercloudclient 4.3.3__tar.gz → 4.4.0__tar.gz
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.
- {capmonstercloudclient-4.3.3/capmonstercloudclient.egg-info → capmonstercloudclient-4.4.0}/PKG-INFO +1 -1
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/CapMonsterCloudClient.py +14 -2
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/GetResultTimeouts.py +12 -0
- capmonstercloudclient-4.4.0/capmonstercloud_client/requests/ArCaptchaRequest.py +34 -0
- capmonstercloudclient-4.4.0/capmonstercloud_client/requests/FengkongCloudCustomTaskRequest.py +44 -0
- capmonstercloudclient-4.4.0/capmonstercloud_client/requests/HeyTapCustomTaskRequest.py +48 -0
- capmonstercloudclient-4.4.0/capmonstercloud_client/requests/ProtonCustomTaskRequest.py +56 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecaptchaV2EnterpiseRequest.py +16 -2
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/__init__.py +9 -1
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/utils.py +1 -1
- capmonstercloudclient-4.4.0/capmonstercloud_client/version.txt +1 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0/capmonstercloudclient.egg-info}/PKG-INFO +1 -1
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloudclient.egg-info/SOURCES.txt +4 -0
- capmonstercloudclient-4.3.3/capmonstercloud_client/version.txt +0 -1
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/LICENSE +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/MANIFEST.in +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/README.md +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/__init__.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/captchaResult.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/clientOptions.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/exceptions.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requestController.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/AlibabaCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/AltchaCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/AmazonWafRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/BasiliskCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/BinanceTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/CastleCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/ComplexImageTaskBase.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/CustomTaskRequestBase.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/DataDomeCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/FriendlyCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/FuncaptchaComplexImageTask.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/FuncaptchaRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/GeetestRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/HcaptchaComplexImageTask.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/HcaptchaRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/HuntCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/ImageToTextRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/ImpervaCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/MTCaptchaRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/ProsopoTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecaptchaComplexImageTask.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecaptchaV2Request.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecaptchaV3EnterpriseRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecaptchaV3ProxylessRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/RecognitionComplexImageTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/TemuCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/TenDiCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/TspdCustomTaskRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/TurnstileRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/YidunRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/baseRequest.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/baseRequestWithProxy.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/enums.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/proxy_info.py +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloudclient.egg-info/dependency_links.txt +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloudclient.egg-info/requires.txt +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloudclient.egg-info/top_level.txt +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/pyproject.toml +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/requirements.txt +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/setup.cfg +0 -0
- {capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/setup.py +0 -0
{capmonstercloudclient-4.3.3/capmonstercloudclient.egg-info → capmonstercloudclient-4.4.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capmonstercloudclient
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
4
4
|
Summary: Official CapMonster Cloud Python SDK: captcha solver & captcha bypass for reCAPTCHA, Cloudflare Turnstile, DataDome and GeeTest. A 2captcha and capsolver alternative.
|
|
5
5
|
Home-page: https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
|
|
6
6
|
Author: CapMonster Cloud
|
|
@@ -42,6 +42,10 @@ _instance_config = (
|
|
|
42
42
|
((HuntCustomTaskRequest,), getHuntTimeouts),
|
|
43
43
|
((AlibabaCustomTaskRequest,), getAlibabaTimeouts),
|
|
44
44
|
((FriendlyCustomTaskRequest,), getFriendlyTimeouts),
|
|
45
|
+
((FengkongCloudCustomTaskRequest,), getFengkongCloudTimeouts),
|
|
46
|
+
((ArCaptchaRequest,), getArCaptchaTimeouts),
|
|
47
|
+
((HeyTapCustomTaskRequest,), getHeyTapTimeouts),
|
|
48
|
+
((ProtonCustomTaskRequest,), getProtonTimeouts),
|
|
45
49
|
)
|
|
46
50
|
|
|
47
51
|
|
|
@@ -110,7 +114,11 @@ class CapMonsterClient:
|
|
|
110
114
|
TspdCustomTaskRequest,
|
|
111
115
|
HuntCustomTaskRequest,
|
|
112
116
|
AlibabaCustomTaskRequest,
|
|
113
|
-
FriendlyCustomTaskRequest
|
|
117
|
+
FriendlyCustomTaskRequest,
|
|
118
|
+
FengkongCloudCustomTaskRequest,
|
|
119
|
+
ArCaptchaRequest,
|
|
120
|
+
HeyTapCustomTaskRequest,
|
|
121
|
+
ProtonCustomTaskRequest],
|
|
114
122
|
) -> Dict[str, str]:
|
|
115
123
|
'''
|
|
116
124
|
Non-blocking method for captcha solving.
|
|
@@ -154,7 +162,11 @@ class CapMonsterClient:
|
|
|
154
162
|
TspdCustomTaskRequest,
|
|
155
163
|
HuntCustomTaskRequest,
|
|
156
164
|
AlibabaCustomTaskRequest,
|
|
157
|
-
FriendlyCustomTaskRequest
|
|
165
|
+
FriendlyCustomTaskRequest,
|
|
166
|
+
FengkongCloudCustomTaskRequest,
|
|
167
|
+
ArCaptchaRequest,
|
|
168
|
+
HeyTapCustomTaskRequest,
|
|
169
|
+
ProtonCustomTaskRequest],
|
|
158
170
|
timeouts: GetResultTimeouts,
|
|
159
171
|
) -> Dict[str, str]:
|
|
160
172
|
|
|
@@ -85,3 +85,15 @@ def getProsopoTimeouts() -> GetResultTimeouts:
|
|
|
85
85
|
|
|
86
86
|
def getTemuTimeouts() -> GetResultTimeouts:
|
|
87
87
|
return GetResultTimeouts(1, 10, 3, 180)
|
|
88
|
+
|
|
89
|
+
def getFengkongCloudTimeouts() -> GetResultTimeouts:
|
|
90
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
|
91
|
+
|
|
92
|
+
def getArCaptchaTimeouts() -> GetResultTimeouts:
|
|
93
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
|
94
|
+
|
|
95
|
+
def getHeyTapTimeouts() -> GetResultTimeouts:
|
|
96
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
|
97
|
+
|
|
98
|
+
def getProtonTimeouts() -> GetResultTimeouts:
|
|
99
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from typing import Dict, Optional, Union
|
|
2
|
+
from pydantic import Field
|
|
3
|
+
|
|
4
|
+
from .baseRequest import BaseRequest
|
|
5
|
+
|
|
6
|
+
class ArCaptchaRequest(BaseRequest):
|
|
7
|
+
"""
|
|
8
|
+
Represents a payload structure for solving ARCaptcha challenges.
|
|
9
|
+
|
|
10
|
+
Attributes:
|
|
11
|
+
websiteUrl: The URL of the webpage containing the ARCaptcha challenge.
|
|
12
|
+
websiteKey: The site key associated with the ARCaptcha on the webpage.
|
|
13
|
+
type: The constant string value identifying the task type as
|
|
14
|
+
"ArCaptchaTask".
|
|
15
|
+
isInvisible: True if the captcha is invisible (has a hidden
|
|
16
|
+
verification field).
|
|
17
|
+
userAgent: Browser User-Agent to emulate.
|
|
18
|
+
"""
|
|
19
|
+
websiteUrl: str = Field(..., description='Address of a webpage with ARCaptcha.')
|
|
20
|
+
websiteKey: str = Field(..., description='The site key associated with the ARCaptcha on the webpage.')
|
|
21
|
+
type: str = Field(default='ArCaptchaTask', description='The constant string value identifying the task type as "ArCaptchaTask".')
|
|
22
|
+
isInvisible: Optional[bool] = Field(default=None, description='True if the captcha is invisible (has a hidden verification field).')
|
|
23
|
+
userAgent: Optional[str] = Field(default=None, description='Browser User-Agent to emulate.')
|
|
24
|
+
|
|
25
|
+
def getTaskDict(self) -> Dict[str, Union[str, bool]]:
|
|
26
|
+
task = {}
|
|
27
|
+
task['type'] = self.type
|
|
28
|
+
task['websiteURL'] = self.websiteUrl
|
|
29
|
+
task['websiteKey'] = self.websiteKey
|
|
30
|
+
if self.isInvisible is not None:
|
|
31
|
+
task['isInvisible'] = self.isInvisible
|
|
32
|
+
if self.userAgent is not None:
|
|
33
|
+
task['userAgent'] = self.userAgent
|
|
34
|
+
return task
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Dict, Optional, Union
|
|
2
|
+
from pydantic import Field, field_validator
|
|
3
|
+
|
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
|
5
|
+
|
|
6
|
+
class FengkongCloudCustomTaskRequest(CustomTaskRequestBase):
|
|
7
|
+
"""
|
|
8
|
+
Represents a payload structure for solving FengkongCloud captcha
|
|
9
|
+
challenges via a custom module.
|
|
10
|
+
|
|
11
|
+
Attributes:
|
|
12
|
+
captchaClass: The class (subtype) identifier of the custom
|
|
13
|
+
module, constant "fengkongcloud" for this task.
|
|
14
|
+
websiteKey: The siteKey value found on the page (the appid
|
|
15
|
+
parameter of the /conf request).
|
|
16
|
+
metadata: Optional dictionary; the only allowed key is apiJsUrl,
|
|
17
|
+
the link to smcp.min.js.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
captchaClass: str = Field(default='fengkongcloud', description='Class (subtype) identifier of the custom module, constant "fengkongcloud".')
|
|
21
|
+
websiteKey: str = Field(..., description='The siteKey value found on the page.')
|
|
22
|
+
metadata: Optional[Dict[str, str]] = Field(default=None, description='Optional dictionary; the only allowed key is apiJsUrl, the link to smcp.min.js.')
|
|
23
|
+
|
|
24
|
+
@field_validator('metadata')
|
|
25
|
+
@classmethod
|
|
26
|
+
def validate_metadata(cls, value):
|
|
27
|
+
if value is None:
|
|
28
|
+
return value
|
|
29
|
+
allowed = {'apiJsUrl'}
|
|
30
|
+
if not set(value.keys()).issubset(allowed):
|
|
31
|
+
raise TypeError(f'Allowed keys for metadata are {sorted(allowed)}.')
|
|
32
|
+
return value
|
|
33
|
+
|
|
34
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
|
35
|
+
task = {}
|
|
36
|
+
task['type'] = self.type
|
|
37
|
+
task['class'] = self.captchaClass
|
|
38
|
+
task['websiteURL'] = self.websiteUrl
|
|
39
|
+
task['websiteKey'] = self.websiteKey
|
|
40
|
+
if self.metadata is not None:
|
|
41
|
+
task['metadata'] = self.metadata
|
|
42
|
+
if self.userAgent is not None:
|
|
43
|
+
task['userAgent'] = self.userAgent
|
|
44
|
+
return task
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from typing import Dict, Optional, Union
|
|
2
|
+
from pydantic import Field, field_validator
|
|
3
|
+
|
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
|
5
|
+
|
|
6
|
+
class HeyTapCustomTaskRequest(CustomTaskRequestBase):
|
|
7
|
+
"""
|
|
8
|
+
Represents a payload structure for solving HeyTap captcha challenges
|
|
9
|
+
via a custom module.
|
|
10
|
+
|
|
11
|
+
Attributes:
|
|
12
|
+
captchaClass: The class (subtype) identifier of the custom
|
|
13
|
+
module, constant "heytap" for this task.
|
|
14
|
+
websiteKey: The siteKey value found on the page (the ak
|
|
15
|
+
parameter of the HeyTap captcha API request).
|
|
16
|
+
metadata: Optional dictionary; the only allowed key is apiServer,
|
|
17
|
+
the HeyTap API server domain without the https:// prefix
|
|
18
|
+
(needed only if it differs from the default server).
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
captchaClass: str = Field(default='heytap', description='Class (subtype) identifier of the custom module, constant "heytap".')
|
|
22
|
+
websiteKey: str = Field(..., description='The siteKey value found on the page.')
|
|
23
|
+
metadata: Optional[Dict[str, str]] = Field(default=None, description='Optional dictionary; the only allowed key is apiServer, the HeyTap API server domain without the https:// prefix.')
|
|
24
|
+
|
|
25
|
+
@field_validator('metadata')
|
|
26
|
+
@classmethod
|
|
27
|
+
def validate_metadata(cls, value):
|
|
28
|
+
if value is None:
|
|
29
|
+
return value
|
|
30
|
+
allowed = {'apiServer'}
|
|
31
|
+
if not set(value.keys()).issubset(allowed):
|
|
32
|
+
raise TypeError(f'Allowed keys for metadata are {sorted(allowed)}.')
|
|
33
|
+
api_server = value.get('apiServer')
|
|
34
|
+
if api_server is not None and api_server.startswith(('https://', 'http://')):
|
|
35
|
+
raise TypeError(f'apiServer must be a domain without the https:// prefix.')
|
|
36
|
+
return value
|
|
37
|
+
|
|
38
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
|
39
|
+
task = {}
|
|
40
|
+
task['type'] = self.type
|
|
41
|
+
task['class'] = self.captchaClass
|
|
42
|
+
task['websiteURL'] = self.websiteUrl
|
|
43
|
+
task['websiteKey'] = self.websiteKey
|
|
44
|
+
if self.metadata is not None:
|
|
45
|
+
task['metadata'] = self.metadata
|
|
46
|
+
if self.userAgent is not None:
|
|
47
|
+
task['userAgent'] = self.userAgent
|
|
48
|
+
return task
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from typing import Dict, Union
|
|
2
|
+
from pydantic import Field, field_validator, model_validator
|
|
3
|
+
|
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
|
5
|
+
|
|
6
|
+
class ProtonCustomTaskRequest(CustomTaskRequestBase):
|
|
7
|
+
"""
|
|
8
|
+
Represents a payload structure for solving Proton Captcha challenges
|
|
9
|
+
via a custom module.
|
|
10
|
+
|
|
11
|
+
Attributes:
|
|
12
|
+
captchaClass: The class (subtype) identifier of the custom
|
|
13
|
+
module, constant "proton" for this task.
|
|
14
|
+
metadata: A dictionary with the required HumanVerificationToken
|
|
15
|
+
and pageAction ("login" or "signup").
|
|
16
|
+
proxy: Proxy settings to route the request through. Required for
|
|
17
|
+
this task type.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
captchaClass: str = Field(default='proton', description='Class (subtype) identifier of the custom module, constant "proton".')
|
|
21
|
+
metadata: Dict[str, str] = Field(..., description='A dictionary with the required HumanVerificationToken and pageAction ("login" or "signup").')
|
|
22
|
+
|
|
23
|
+
@field_validator('metadata')
|
|
24
|
+
@classmethod
|
|
25
|
+
def validate_metadata(cls, value):
|
|
26
|
+
allowed = {'HumanVerificationToken', 'pageAction'}
|
|
27
|
+
if not set(value.keys()).issubset(allowed):
|
|
28
|
+
raise TypeError(f'Allowed keys for metadata are {sorted(allowed)}.')
|
|
29
|
+
for key in sorted(allowed):
|
|
30
|
+
if value.get(key) is None:
|
|
31
|
+
raise TypeError(f'{key} must be defined inside metadata.')
|
|
32
|
+
if value['pageAction'] not in ('login', 'signup'):
|
|
33
|
+
raise TypeError(f'pageAction must be "login" or "signup".')
|
|
34
|
+
return value
|
|
35
|
+
|
|
36
|
+
@model_validator(mode='before')
|
|
37
|
+
def validate_proton_proxy(cls, values):
|
|
38
|
+
proxy = values.get('proxy')
|
|
39
|
+
if proxy is None:
|
|
40
|
+
raise RuntimeError(f'You are required to use your own proxies.')
|
|
41
|
+
return values
|
|
42
|
+
|
|
43
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
|
44
|
+
task = {}
|
|
45
|
+
task['type'] = self.type
|
|
46
|
+
task['class'] = self.captchaClass
|
|
47
|
+
task['websiteURL'] = self.websiteUrl
|
|
48
|
+
task['metadata'] = self.metadata
|
|
49
|
+
task['proxyType'] = self.proxy.proxyType
|
|
50
|
+
task['proxyAddress'] = self.proxy.proxyAddress
|
|
51
|
+
task['proxyPort'] = self.proxy.proxyPort
|
|
52
|
+
task['proxyLogin'] = self.proxy.proxyLogin
|
|
53
|
+
task['proxyPassword'] = self.proxy.proxyPassword
|
|
54
|
+
if self.userAgent is not None:
|
|
55
|
+
task['userAgent'] = self.userAgent
|
|
56
|
+
return task
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from typing import Dict, Union, Optional
|
|
2
|
-
from pydantic import Field
|
|
2
|
+
from pydantic import Field, field_validator
|
|
3
3
|
|
|
4
4
|
from .baseRequestWithProxy import BaseRequestWithProxy
|
|
5
5
|
|
|
@@ -22,6 +22,8 @@ class RecaptchaV2EnterpriseRequest(BaseRequestWithProxy):
|
|
|
22
22
|
domain.
|
|
23
23
|
pageAction: The action name configured for the reCAPTCHA Enterprise
|
|
24
24
|
challenge on the target website.
|
|
25
|
+
minScore: The minimum acceptable score for the token, in the range
|
|
26
|
+
0.1-0.9.
|
|
25
27
|
recaptchaDataSValue: The one-time token from the widget's "data-s"
|
|
26
28
|
parameter, if present on the page.
|
|
27
29
|
userAgent: The User-Agent string of the browser that should be
|
|
@@ -35,11 +37,21 @@ class RecaptchaV2EnterpriseRequest(BaseRequestWithProxy):
|
|
|
35
37
|
enterprisePayload: Optional[str] = Field(default=None, description='Additional parameters passed to the reCAPTCHA Enterprise widget, such as a custom "s" value used by some implementations.')
|
|
36
38
|
apiDomain: Optional[str] = Field(default=None, description='The domain to load the reCAPTCHA API from, used when the challenge is served from a domain other than the default Google domain.')
|
|
37
39
|
pageAction: Optional[str] = Field(default=None, description='The action name configured for the reCAPTCHA Enterprise challenge on the target website.')
|
|
40
|
+
minScore: Optional[float] = Field(default=None, description='Minimum acceptable score for the token, in the range 0.1-0.9.')
|
|
38
41
|
recaptchaDataSValue: Optional[str] = Field(default=None, description='The one-time token from the widget\'s "data-s" parameter, if present on the page.')
|
|
39
42
|
userAgent: Optional[str] = Field(default=None, description='The User-Agent string of the browser that should be emulated while solving the challenge.')
|
|
40
43
|
cookies: Optional[str] = Field(default=None, description='Cookies to be sent along with the request when solving the challenge.')
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
@field_validator('minScore')
|
|
46
|
+
@classmethod
|
|
47
|
+
def validate_min_score(cls, value):
|
|
48
|
+
if value is not None:
|
|
49
|
+
if not 0.1 <= value <= 0.9:
|
|
50
|
+
raise ValueError(f'Minimum score value should be found in interval 0.1 - 0.9, ' \
|
|
51
|
+
f'current "{value}".')
|
|
52
|
+
return value
|
|
53
|
+
|
|
54
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, float]]:
|
|
43
55
|
task = {}
|
|
44
56
|
task['type'] = self.type
|
|
45
57
|
task['websiteURL'] = self.websiteUrl
|
|
@@ -56,6 +68,8 @@ class RecaptchaV2EnterpriseRequest(BaseRequestWithProxy):
|
|
|
56
68
|
task['apiDomain'] = self.apiDomain
|
|
57
69
|
if self.pageAction is not None:
|
|
58
70
|
task['pageAction'] = self.pageAction
|
|
71
|
+
if self.minScore is not None:
|
|
72
|
+
task['minScore'] = self.minScore
|
|
59
73
|
if self.recaptchaDataSValue is not None:
|
|
60
74
|
task['recaptchaDataSValue'] = self.recaptchaDataSValue
|
|
61
75
|
if self.userAgent is not None:
|
|
@@ -29,6 +29,10 @@ from .TspdCustomTaskRequest import TspdCustomTaskRequest
|
|
|
29
29
|
from .HuntCustomTaskRequest import HuntCustomTaskRequest
|
|
30
30
|
from .AlibabaCustomTaskRequest import AlibabaCustomTaskRequest
|
|
31
31
|
from .FriendlyCustomTaskRequest import FriendlyCustomTaskRequest
|
|
32
|
+
from .FengkongCloudCustomTaskRequest import FengkongCloudCustomTaskRequest
|
|
33
|
+
from .ArCaptchaRequest import ArCaptchaRequest
|
|
34
|
+
from .HeyTapCustomTaskRequest import HeyTapCustomTaskRequest
|
|
35
|
+
from .ProtonCustomTaskRequest import ProtonCustomTaskRequest
|
|
32
36
|
from .proxy_info import ProxyInfo, ClientProxyInfo
|
|
33
37
|
|
|
34
38
|
|
|
@@ -54,5 +58,9 @@ REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2Request', 'RecaptchaV3Pro
|
|
|
54
58
|
'TspdCustomTaskRequest',
|
|
55
59
|
'HuntCustomTaskRequest',
|
|
56
60
|
'AlibabaCustomTaskRequest',
|
|
57
|
-
'FriendlyCustomTaskRequest'
|
|
61
|
+
'FriendlyCustomTaskRequest',
|
|
62
|
+
'FengkongCloudCustomTaskRequest',
|
|
63
|
+
'ArCaptchaRequest',
|
|
64
|
+
'HeyTapCustomTaskRequest',
|
|
65
|
+
'ProtonCustomTaskRequest'
|
|
58
66
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4.4.0
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0/capmonstercloudclient.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capmonstercloudclient
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
4
4
|
Summary: Official CapMonster Cloud Python SDK: captcha solver & captcha bypass for reCAPTCHA, Cloudflare Turnstile, DataDome and GeeTest. A 2captcha and capsolver alternative.
|
|
5
5
|
Home-page: https://github.com/CapMonsterCloud/capmonster-python-captcha-solver
|
|
6
6
|
Author: CapMonster Cloud
|
|
@@ -16,23 +16,27 @@ capmonstercloud_client/version.txt
|
|
|
16
16
|
capmonstercloud_client/requests/AlibabaCustomTaskRequest.py
|
|
17
17
|
capmonstercloud_client/requests/AltchaCustomTaskRequest.py
|
|
18
18
|
capmonstercloud_client/requests/AmazonWafRequest.py
|
|
19
|
+
capmonstercloud_client/requests/ArCaptchaRequest.py
|
|
19
20
|
capmonstercloud_client/requests/BasiliskCustomTaskRequest.py
|
|
20
21
|
capmonstercloud_client/requests/BinanceTaskRequest.py
|
|
21
22
|
capmonstercloud_client/requests/CastleCustomTaskRequest.py
|
|
22
23
|
capmonstercloud_client/requests/ComplexImageTaskBase.py
|
|
23
24
|
capmonstercloud_client/requests/CustomTaskRequestBase.py
|
|
24
25
|
capmonstercloud_client/requests/DataDomeCustomTaskRequest.py
|
|
26
|
+
capmonstercloud_client/requests/FengkongCloudCustomTaskRequest.py
|
|
25
27
|
capmonstercloud_client/requests/FriendlyCustomTaskRequest.py
|
|
26
28
|
capmonstercloud_client/requests/FuncaptchaComplexImageTask.py
|
|
27
29
|
capmonstercloud_client/requests/FuncaptchaRequest.py
|
|
28
30
|
capmonstercloud_client/requests/GeetestRequest.py
|
|
29
31
|
capmonstercloud_client/requests/HcaptchaComplexImageTask.py
|
|
30
32
|
capmonstercloud_client/requests/HcaptchaRequest.py
|
|
33
|
+
capmonstercloud_client/requests/HeyTapCustomTaskRequest.py
|
|
31
34
|
capmonstercloud_client/requests/HuntCustomTaskRequest.py
|
|
32
35
|
capmonstercloud_client/requests/ImageToTextRequest.py
|
|
33
36
|
capmonstercloud_client/requests/ImpervaCustomTaskRequest.py
|
|
34
37
|
capmonstercloud_client/requests/MTCaptchaRequest.py
|
|
35
38
|
capmonstercloud_client/requests/ProsopoTaskRequest.py
|
|
39
|
+
capmonstercloud_client/requests/ProtonCustomTaskRequest.py
|
|
36
40
|
capmonstercloud_client/requests/RecaptchaComplexImageTask.py
|
|
37
41
|
capmonstercloud_client/requests/RecaptchaV2EnterpiseRequest.py
|
|
38
42
|
capmonstercloud_client/requests/RecaptchaV2Request.py
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4.3.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/__init__.py
RENAMED
|
File without changes
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/captchaResult.py
RENAMED
|
File without changes
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/clientOptions.py
RENAMED
|
File without changes
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capmonstercloudclient-4.3.3 → capmonstercloudclient-4.4.0}/capmonstercloud_client/requests/enums.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|