capmonstercloudclient 1.3.3__py3-none-any.whl → 1.5.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.
- capmonstercloudclient/CapMonsterCloudClient.py +8 -1
- capmonstercloudclient/GetResultTimeouts.py +13 -1
- capmonstercloudclient/exceptions.py +5 -0
- capmonstercloudclient/requests/AmazonWafProxylessRequest.py +22 -0
- capmonstercloudclient/requests/AmazonWafRequest.py +28 -0
- capmonstercloudclient/requests/AmazonWafRequestBase.py +13 -0
- capmonstercloudclient/requests/BasiliskCustomTaskProxylessRequest.py +16 -0
- capmonstercloudclient/requests/BasiliskCustomTaskRequest.py +22 -0
- capmonstercloudclient/requests/BasiliskCustomTaskRequestBase.py +11 -0
- capmonstercloudclient/requests/CustomTaskRequestBase.py +10 -0
- capmonstercloudclient/requests/DataDomeCustomTaskProxylessRequest.py +36 -0
- capmonstercloudclient/requests/DataDomeCustomTaskRequest.py +42 -0
- capmonstercloudclient/requests/DataDomeCustomTaskRequestBase.py +8 -0
- capmonstercloudclient/requests/FuncaptchaRequest.py +5 -5
- capmonstercloudclient/requests/GeetestRequest.py +5 -6
- capmonstercloudclient/requests/HcaptchaComplexImageTask.py +45 -4
- capmonstercloudclient/requests/HcaptchaProxylessRequest.py +2 -0
- capmonstercloudclient/requests/HcaptchaRequest.py +7 -5
- capmonstercloudclient/requests/HcaptchaRequestBase.py +2 -1
- capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py +5 -5
- capmonstercloudclient/requests/RecaptchaV2Request.py +5 -5
- capmonstercloudclient/requests/TenDiCustomTaskProxylessRequest.py +16 -0
- capmonstercloudclient/requests/TenDiCustomTaskRequest.py +22 -0
- capmonstercloudclient/requests/TenDiCustomTaskRequestBase.py +11 -0
- capmonstercloudclient/requests/__init__.py +11 -1
- capmonstercloudclient/requests/proxy_info.py +7 -7
- capmonstercloudclient/version.txt +1 -1
- capmonstercloudclient-1.5.0.dist-info/METADATA +87 -0
- capmonstercloudclient-1.5.0.dist-info/RECORD +55 -0
- {capmonstercloudclient-1.3.3.dist-info → capmonstercloudclient-1.5.0.dist-info}/WHEEL +1 -1
- capmonstercloudclient-1.3.3.dist-info/METADATA +0 -86
- capmonstercloudclient-1.3.3.dist-info/RECORD +0 -42
- {capmonstercloudclient-1.3.3.dist-info → capmonstercloudclient-1.5.0.dist-info}/LICENSE +0 -0
- {capmonstercloudclient-1.3.3.dist-info → capmonstercloudclient-1.5.0.dist-info}/top_level.txt +0 -0
@@ -24,6 +24,11 @@ _instance_config = (
|
|
24
24
|
((TurnstileProxylessRequest, TurnstileRequest), getTurnstileTimeouts),
|
25
25
|
((RecaptchaComplexImageTaskRequest, HcaptchaComplexImageTaskRequest,
|
26
26
|
FunCaptchaComplexImageTaskRequest), getImage2TextTimeouts),
|
27
|
+
((DataDomeCustomTaskRequest, DataDomeCustomTaskProxylessRequest), getDatadomeTimeouts),
|
28
|
+
((TenDiCustomTaskRequest, TenDiCustomTaskProxylessRequest), getTenDiTimeouts),
|
29
|
+
((BasiliskCustomTaskRequest, BasiliskCustomTaskProxylessRequest), getBasiliskTimeouts),
|
30
|
+
((AmazonWafRequest, AmazonWafProxylessRequest), getAmazonWafTimeouts),
|
31
|
+
|
27
32
|
)
|
28
33
|
|
29
34
|
|
@@ -70,7 +75,9 @@ class CapMonsterClient:
|
|
70
75
|
TurnstileRequest,
|
71
76
|
HcaptchaComplexImageTaskRequest,
|
72
77
|
RecaptchaComplexImageTaskRequest,
|
73
|
-
FunCaptchaComplexImageTaskRequest
|
78
|
+
FunCaptchaComplexImageTaskRequest,
|
79
|
+
DataDomeCustomTaskProxylessRequest,
|
80
|
+
DataDomeCustomTaskRequest],
|
74
81
|
) -> Dict[str, str]:
|
75
82
|
'''
|
76
83
|
Non-blocking method for captcha solving.
|
@@ -30,4 +30,16 @@ def getGeetestTimeouts() -> GetResultTimeouts:
|
|
30
30
|
return GetResultTimeouts(1, 0, 1, 80)
|
31
31
|
|
32
32
|
def getTurnstileTimeouts() -> GetResultTimeouts:
|
33
|
-
return GetResultTimeouts(1, 0, 1, 80)
|
33
|
+
return GetResultTimeouts(1, 0, 1, 80)
|
34
|
+
|
35
|
+
def getDatadomeTimeouts() -> GetResultTimeouts:
|
36
|
+
return GetResultTimeouts(1, 0, 1, 80)
|
37
|
+
|
38
|
+
def getTenDiTimeouts() -> GetResultTimeouts:
|
39
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
40
|
+
|
41
|
+
def getBasiliskTimeouts() -> GetResultTimeouts:
|
42
|
+
return GetResultTimeouts(1, 10, 3, 100)
|
43
|
+
|
44
|
+
def getAmazonWafTimeouts() -> GetResultTimeouts:
|
45
|
+
return GetResultTimeouts(1, 10, 3, 180)
|
@@ -21,6 +21,11 @@ class ZeroImagesErrors(BaseError):
|
|
21
21
|
class TaskNotDefinedError(BaseError):
|
22
22
|
pass
|
23
23
|
|
24
|
+
class ExtraParamsError(BaseError):
|
25
|
+
pass
|
26
|
+
|
27
|
+
|
28
|
+
|
24
29
|
class UserAgentNotDefinedError(BaseError):
|
25
30
|
|
26
31
|
default_message = 'If "imageUrls" is not defined, then "userAgent" must explicitly specify signature ' \
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .proxy_info import ProxyInfo
|
5
|
+
from .AmazonWafRequestBase import AmazonWafRequestBase
|
6
|
+
|
7
|
+
class AmazonWafProxylessRequest(AmazonWafRequestBase):
|
8
|
+
type: str = 'AmazonTaskProxyless'
|
9
|
+
|
10
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
11
|
+
task = {}
|
12
|
+
task['type'] = self.type
|
13
|
+
task['websiteURL'] = self.websiteUrl
|
14
|
+
task['challengeScript'] = self.challengeScript
|
15
|
+
task['captchaScript'] = self.captchaScript
|
16
|
+
task['websiteKey'] = self.websiteKey
|
17
|
+
task['context'] = self.context
|
18
|
+
task['iv'] = self.iv
|
19
|
+
|
20
|
+
if self.cookieSolution is not None:
|
21
|
+
task['cookieSolution'] = self.cookieSolution
|
22
|
+
return task
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .proxy_info import ProxyInfo
|
5
|
+
from .AmazonWafRequestBase import AmazonWafRequestBase
|
6
|
+
|
7
|
+
class AmazonWafRequest(AmazonWafRequestBase, ProxyInfo):
|
8
|
+
type: str = 'AmazonTask'
|
9
|
+
|
10
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
11
|
+
task = {}
|
12
|
+
task['type'] = self.type
|
13
|
+
task['websiteURL'] = self.websiteUrl
|
14
|
+
task['challengeScript'] = self.challengeScript
|
15
|
+
task['captchaScript'] = self.captchaScript
|
16
|
+
task['websiteKey'] = self.websiteKey
|
17
|
+
task['context'] = self.context
|
18
|
+
task['iv'] = self.iv
|
19
|
+
|
20
|
+
task['proxyType'] = self.proxyType
|
21
|
+
task['proxyAddress'] = self.proxyAddress
|
22
|
+
task['proxyPort'] = self.proxyPort
|
23
|
+
task['proxyLogin'] = self.proxyLogin
|
24
|
+
task['proxyPassword'] = self.proxyPassword
|
25
|
+
|
26
|
+
if self.cookieSolution is not None:
|
27
|
+
task['cookieSolution'] = self.cookieSolution
|
28
|
+
return task
|
@@ -0,0 +1,13 @@
|
|
1
|
+
from pydantic import Field
|
2
|
+
from typing import Optional
|
3
|
+
|
4
|
+
from .baseRequest import BaseRequest
|
5
|
+
|
6
|
+
class AmazonWafRequestBase(BaseRequest):
|
7
|
+
websiteUrl: str
|
8
|
+
challengeScript: str
|
9
|
+
captchaScript: str
|
10
|
+
websiteKey: str
|
11
|
+
context: str
|
12
|
+
iv: str
|
13
|
+
cookieSolution: Optional[bool] = Field(default=None)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .BasiliskCustomTaskRequestBase import BasiliskCustomTaskRequestBase
|
5
|
+
|
6
|
+
class BasiliskCustomTaskProxylessRequest(BasiliskCustomTaskRequestBase):
|
7
|
+
|
8
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
9
|
+
task = {}
|
10
|
+
task['type'] = self.type
|
11
|
+
task['class'] = self.captchaClass
|
12
|
+
task['websiteURL'] = self.websiteUrl
|
13
|
+
task['websiteKey'] = self.websiteKey
|
14
|
+
if self.userAgent is not None:
|
15
|
+
task['userAgent'] = self.userAgent
|
16
|
+
return task
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .proxy_info import ProxyInfo
|
5
|
+
from .BasiliskCustomTaskRequestBase import BasiliskCustomTaskRequestBase
|
6
|
+
|
7
|
+
class BasiliskCustomTaskRequest(BasiliskCustomTaskRequestBase, ProxyInfo):
|
8
|
+
|
9
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
10
|
+
task = {}
|
11
|
+
task['type'] = self.type
|
12
|
+
task['class'] = self.captchaClass
|
13
|
+
task['websiteURL'] = self.websiteUrl
|
14
|
+
task['websiteKey'] = self.websiteKey
|
15
|
+
task['proxyType'] = self.proxyType
|
16
|
+
task['proxyAddress'] = self.proxyAddress
|
17
|
+
task['proxyPort'] = self.proxyPort
|
18
|
+
task['proxyLogin'] = self.proxyLogin
|
19
|
+
task['proxyPassword'] = self.proxyPassword
|
20
|
+
if self.userAgent is not None:
|
21
|
+
task['userAgent'] = self.userAgent
|
22
|
+
return task
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from .baseRequest import BaseRequest, Field
|
2
|
+
from typing import Optional
|
3
|
+
from pydantic import validator, model_validator
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
5
|
+
|
6
|
+
|
7
|
+
class BasiliskCustomTaskRequestBase(CustomTaskRequestBase):
|
8
|
+
|
9
|
+
type: str = Field(default='CustomTask')
|
10
|
+
captchaClass: str = Field(default='Basilisk')
|
11
|
+
websiteKey: str = Field()
|
@@ -0,0 +1,10 @@
|
|
1
|
+
from typing import Optional, List, Dict
|
2
|
+
|
3
|
+
from .baseRequest import BaseRequest
|
4
|
+
|
5
|
+
class CustomTaskRequestBase(BaseRequest):
|
6
|
+
captchaClass: str # Class(subtype) of ComplexImageTask
|
7
|
+
type: str = "CustomTask" # Recognition task type
|
8
|
+
websiteUrl: str # Address of a webpage with captcha
|
9
|
+
userAgent: Optional[str] = None # It is required that you use a signature of a modern browser
|
10
|
+
domains: Optional[List[str]] = None # Collection with base64 encoded images. Must be populated if <see cref="ImageUrls"/> not.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .DataDomeCustomTaskRequestBase import DataDomeCustomTaskRequestBase
|
5
|
+
|
6
|
+
class DataDomeCustomTaskProxylessRequest(DataDomeCustomTaskRequestBase):
|
7
|
+
metadata : Dict[str, str]
|
8
|
+
|
9
|
+
@validator('metadata')
|
10
|
+
def validate_metadata(cls, value):
|
11
|
+
if value.get('datadomeCookie') is None:
|
12
|
+
raise ValueError(f'Expect that datadomeCookie will be defined.')
|
13
|
+
if value.get('captchaUrl') and value.get('htmlPageBase64'):
|
14
|
+
raise ValueError(f'Expected only one of [captchaUrl, htmlPageBase64]')
|
15
|
+
elif value.get('captchaUrl'):
|
16
|
+
if not isinstance(value.get('captchaUrl'), str):
|
17
|
+
raise ValueError(f'Expect that type imagesUrls array will be <str>, got {type(value.get("captchaUrl"))}')
|
18
|
+
return {i: value[i] for i in value if i != 'htmlPageBase64'}
|
19
|
+
elif value.get('htmlPageBase64'):
|
20
|
+
if not isinstance(value.get('htmlPageBase64'), str):
|
21
|
+
raise ValueError(f'Expect that type imagesUrls array will be <str>, got {type(value.get("htmlPageBase64"))}')
|
22
|
+
return {i: value[i] for i in value if i != 'captchaUrl'}
|
23
|
+
else:
|
24
|
+
raise ValueError(f'Expected one of [captchaUrl, htmlPageBase64]')
|
25
|
+
|
26
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
27
|
+
task = {}
|
28
|
+
task['type'] = self.type
|
29
|
+
task['class'] = self.captchaClass
|
30
|
+
task['websiteURL'] = self.websiteUrl
|
31
|
+
task['metadata'] = self.metadata
|
32
|
+
if self.userAgent is not None:
|
33
|
+
task['userAgent'] = self.userAgent
|
34
|
+
if self.domains is not None:
|
35
|
+
task['domains'] = self.domains
|
36
|
+
return task
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
from .DataDomeCustomTaskRequestBase import DataDomeCustomTaskRequestBase
|
4
|
+
from .proxy_info import ProxyInfo
|
5
|
+
|
6
|
+
class DataDomeCustomTaskRequest(DataDomeCustomTaskRequestBase, ProxyInfo):
|
7
|
+
metadata : Dict[str, str]
|
8
|
+
|
9
|
+
@validator('metadata')
|
10
|
+
def validate_metadata(cls, value):
|
11
|
+
if value.get('datadomeCookie') is None:
|
12
|
+
raise TypeError(f'Expect that datadomeCookie will be defined.')
|
13
|
+
if value.get('captchaUrl') and value.get('htmlPageBase64'):
|
14
|
+
raise TypeError(f'Expected only one of [captchaUrl, htmlPageBase64]')
|
15
|
+
elif value.get('captchaUrl'):
|
16
|
+
if not isinstance(value.get('captchaUrl'), str):
|
17
|
+
raise TypeError(f'Expect that type imagesUrls array will be <str>, got {type(value.get("captchaUrl"))}')
|
18
|
+
return {i: value[i] for i in value if i != 'htmlPageBase64'}
|
19
|
+
elif value.get('htmlPageBase64'):
|
20
|
+
if not isinstance(value.get('htmlPageBase64'), str):
|
21
|
+
raise TypeError(f'Expect that type imagesUrls array will be <str>, got {type(value.get("htmlPageBase64"))}')
|
22
|
+
return {i: value[i] for i in value if i != 'captchaUrl'}
|
23
|
+
else:
|
24
|
+
raise TypeError(f'Expected one of [captchaUrl, htmlPageBase64]')
|
25
|
+
|
26
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
27
|
+
task = {}
|
28
|
+
task['type'] = self.type
|
29
|
+
task['class'] = self.captchaClass
|
30
|
+
task['websiteURL'] = self.websiteUrl
|
31
|
+
task['proxyType'] = self.proxyType
|
32
|
+
task['proxyAddress'] = self.proxyAddress
|
33
|
+
task['proxyPort'] = self.proxyPort
|
34
|
+
task['proxyLogin'] = self.proxyLogin
|
35
|
+
task['proxyPassword'] = self.proxyPassword
|
36
|
+
task['domains'] = self.domains
|
37
|
+
task['metadata'] = self.metadata
|
38
|
+
if self.userAgent is not None:
|
39
|
+
task['userAgent'] = self.userAgent
|
40
|
+
if self.domains is not None:
|
41
|
+
task['domains'] = self.domains
|
42
|
+
return task
|
@@ -0,0 +1,8 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field
|
3
|
+
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
5
|
+
|
6
|
+
class DataDomeCustomTaskRequestBase(CustomTaskRequestBase):
|
7
|
+
type: str = Field(default='CustomTask')
|
8
|
+
captchaClass: str = Field(default='DataDome')
|
@@ -12,11 +12,11 @@ class FuncaptchaRequest(FuncaptchaRequestBase, ProxyInfo):
|
|
12
12
|
task['type'] = self.type
|
13
13
|
task['websiteURL'] = self.websiteUrl
|
14
14
|
task['websitePublicKey'] = self.websitePublicKey
|
15
|
-
task['proxyType'] = self.
|
16
|
-
task['proxyAddress'] = self.
|
17
|
-
task['proxyPort'] = self.
|
18
|
-
task['proxyLogin'] = self.
|
19
|
-
task['proxyPassword'] = self.
|
15
|
+
task['proxyType'] = self.proxyType
|
16
|
+
task['proxyAddress'] = self.proxyAddress
|
17
|
+
task['proxyPort'] = self.proxyPort
|
18
|
+
task['proxyLogin'] = self.proxyLogin
|
19
|
+
task['proxyPassword'] = self.proxyPassword
|
20
20
|
if self.funcaptchaApiJSSubdomain is not None:
|
21
21
|
task['funcaptchaApiJSSubdomain'] = self.funcaptchaApiJSSubdomain
|
22
22
|
if self.data is not None:
|
@@ -30,10 +30,9 @@ class GeetestRequest(GeetestRequestBase, ProxyInfo):
|
|
30
30
|
if self.user_agent is not None:
|
31
31
|
task['userAgent'] = self.user_agent
|
32
32
|
|
33
|
-
|
34
|
-
task['
|
35
|
-
task['
|
36
|
-
task['
|
37
|
-
task['
|
38
|
-
task['proxyPassword'] = self.proxy_password
|
33
|
+
task['proxyType'] = self.proxyType
|
34
|
+
task['proxyAddress'] = self.proxyAddress
|
35
|
+
task['proxyPort'] = self.proxyPort
|
36
|
+
task['proxyLogin'] = self.proxyLogin
|
37
|
+
task['proxyPassword'] = self.proxyPassword
|
39
38
|
return task
|
@@ -1,13 +1,15 @@
|
|
1
|
-
from typing import Dict, Union
|
1
|
+
from typing import Dict, Union, List, Optional
|
2
2
|
from pydantic import Field, validator
|
3
3
|
|
4
4
|
from .ComplexImageTaskBase import ComplexImageTaskRequestBase
|
5
|
-
from ..exceptions import NumbersImagesErrors, ZeroImagesErrors, TaskNotDefinedError
|
5
|
+
from ..exceptions import NumbersImagesErrors, ZeroImagesErrors, TaskNotDefinedError, ExtraParamsError
|
6
6
|
|
7
7
|
class HcaptchaComplexImageTaskRequest(ComplexImageTaskRequestBase):
|
8
8
|
|
9
9
|
captchaClass: str = Field(default='hcaptcha')
|
10
10
|
metadata : Dict[str, str]
|
11
|
+
exampleImageUrls: Optional[List[str]]
|
12
|
+
exampleImagesBase64: Optional[List[str]]
|
11
13
|
|
12
14
|
@validator('metadata')
|
13
15
|
def validate_metadata(cls, value):
|
@@ -16,13 +18,43 @@ class HcaptchaComplexImageTaskRequest(ComplexImageTaskRequestBase):
|
|
16
18
|
else:
|
17
19
|
return value
|
18
20
|
|
21
|
+
@validator('exampleImageUrls')
|
22
|
+
def validate_urls_array(cls, value):
|
23
|
+
if value is not None:
|
24
|
+
if not isinstance(value, (list, tuple)):
|
25
|
+
raise TypeError(f'Expect that type exampleImageUrls array will be <list> or <tuple>, got {type(value)}')
|
26
|
+
elif len(value) > 1:
|
27
|
+
raise NumbersImagesErrors(f'Maximum number of images in list 1, got {len(value)}')
|
28
|
+
elif not len(value):
|
29
|
+
raise ZeroImagesErrors(f'At least one image url expected, got {len(value)}')
|
30
|
+
# Check for each element type
|
31
|
+
contain_types = [isinstance(x, str) for x in value]
|
32
|
+
if not all(contain_types):
|
33
|
+
raise TypeError(f'Next images from imagesUrls array are not string: {contain_types}')
|
34
|
+
return value
|
35
|
+
|
36
|
+
@validator('exampleImagesBase64')
|
37
|
+
def validate_urls_array(cls, value):
|
38
|
+
if value is not None:
|
39
|
+
if not isinstance(value, (list, tuple)):
|
40
|
+
raise TypeError(f'Expect that type exampleImagesBase64 array will be <list> or <tuple>, got {type(value)}')
|
41
|
+
elif len(value) > 1:
|
42
|
+
raise NumbersImagesErrors(f'Maximum number of images in list 1, got {len(value)}')
|
43
|
+
elif not len(value):
|
44
|
+
raise ZeroImagesErrors(f'At least one image base64 expected, got {len(value)}')
|
45
|
+
# Check for each element type
|
46
|
+
contain_types = [isinstance(x, str) for x in value]
|
47
|
+
if not all(contain_types):
|
48
|
+
raise TypeError(f'Next images from imagesBase64 array are not string: {contain_types}')
|
49
|
+
return value
|
50
|
+
|
19
51
|
@validator('imagesUrls')
|
20
52
|
def validate_urls_array(cls, value):
|
21
53
|
if value is not None:
|
22
54
|
if not isinstance(value, (list, tuple)):
|
23
55
|
raise TypeError(f'Expect that type imagesUrls array will be <list> or <tuple>, got {type(value)}')
|
24
56
|
elif len(value) > 18:
|
25
|
-
raise NumbersImagesErrors(f'Maximum
|
57
|
+
raise NumbersImagesErrors(f'Maximum number of images in list 18, got {len(value)}')
|
26
58
|
elif not len(value):
|
27
59
|
raise ZeroImagesErrors(f'At least one image url expected, got {len(value)}')
|
28
60
|
# Check for each element type
|
@@ -37,7 +69,7 @@ class HcaptchaComplexImageTaskRequest(ComplexImageTaskRequestBase):
|
|
37
69
|
if not isinstance(value, (list, tuple)):
|
38
70
|
raise TypeError(f'Expect that type imagesBase64 array will be <list> or <tuple>, got {type(value)}')
|
39
71
|
elif len(value) > 18:
|
40
|
-
raise NumbersImagesErrors(f'Maximum
|
72
|
+
raise NumbersImagesErrors(f'Maximum number of images in list 18, got {len(value)}')
|
41
73
|
elif not len(value):
|
42
74
|
raise ZeroImagesErrors(f'At least one image base64 expected, got {len(value)}')
|
43
75
|
# Check for each element type
|
@@ -64,6 +96,15 @@ class HcaptchaComplexImageTaskRequest(ComplexImageTaskRequestBase):
|
|
64
96
|
|
65
97
|
task['metadata'] = self.metadata
|
66
98
|
|
99
|
+
if self.exampleImageUrls and self.exampleImagesBase64:
|
100
|
+
raise ExtraParamsError('Expect only one of [exampleImageUrls, exampleImagesBase64]')
|
101
|
+
|
102
|
+
if self.exampleImageUrls is not None:
|
103
|
+
task['exampleImageUrls'] = self.exampleImageUrls
|
104
|
+
|
105
|
+
if self.exampleImagesBase64 is not None:
|
106
|
+
task['exampleImagesBase64'] = self.exampleImagesBase64
|
107
|
+
|
67
108
|
if self.userAgent is not None:
|
68
109
|
task['userAgent'] = self.userAgent
|
69
110
|
|
@@ -20,4 +20,6 @@ class HcaptchaProxylessRequest(HcaptchaRequestBase):
|
|
20
20
|
task['userAgent'] = self.user_agent
|
21
21
|
if self.cookies is not None:
|
22
22
|
task['cookies'] = self.cookies
|
23
|
+
if self.fallbackToActualUA is not None:
|
24
|
+
task['fallbackToActualUA'] = self.fallbackToActualUA
|
23
25
|
return task
|
@@ -13,11 +13,11 @@ class HcaptchaRequest(HcaptchaRequestBase, ProxyInfo):
|
|
13
13
|
task['type'] = self.type
|
14
14
|
task['websiteURL'] = self.websiteUrl
|
15
15
|
task['websiteKey'] = self.websiteKey
|
16
|
-
task['proxyType'] = self.
|
17
|
-
task['proxyAddress'] = self.
|
18
|
-
task['proxyPort'] = self.
|
19
|
-
task['proxyLogin'] = self.
|
20
|
-
task['proxyPassword'] = self.
|
16
|
+
task['proxyType'] = self.proxyType
|
17
|
+
task['proxyAddress'] = self.proxyAddress
|
18
|
+
task['proxyPort'] = self.proxyPort
|
19
|
+
task['proxyLogin'] = self.proxyLogin
|
20
|
+
task['proxyPassword'] = self.proxyPassword
|
21
21
|
if self.is_invisible is not None:
|
22
22
|
task['isInvisible'] = self.is_invisible
|
23
23
|
if self.data is not None:
|
@@ -26,5 +26,7 @@ class HcaptchaRequest(HcaptchaRequestBase, ProxyInfo):
|
|
26
26
|
task['userAgent'] = self.user_agent
|
27
27
|
if self.cookies is not None:
|
28
28
|
task['cookies'] = self.cookies
|
29
|
+
if self.fallbackToActualUA is not None:
|
30
|
+
task['fallbackToActualUA'] = self.fallbackToActualUA
|
29
31
|
|
30
32
|
return task
|
@@ -9,4 +9,5 @@ class HcaptchaRequestBase(BaseRequest):
|
|
9
9
|
is_invisible: Optional[bool] = Field(default=None)
|
10
10
|
data: Optional[str] = Field(default=None)
|
11
11
|
user_agent: Optional[str] = Field(default=None)
|
12
|
-
cookies: Optional[str] = Field(default=None)
|
12
|
+
cookies: Optional[str] = Field(default=None)
|
13
|
+
fallbackToActualUA: Optional[bool] = Field(default=None)
|
@@ -12,11 +12,11 @@ class RecaptchaV2EnterpriseRequest(RecaptchaV2EnterpriseRequestBase, ProxyInfo):
|
|
12
12
|
task['type'] = self.type
|
13
13
|
task['websiteURL'] = self.websiteUrl
|
14
14
|
task['websiteKey'] = self.websiteKey
|
15
|
-
task['proxyType'] = self.
|
16
|
-
task['proxyAddress'] = self.
|
17
|
-
task['proxyPort'] = self.
|
18
|
-
task['proxyLogin'] = self.
|
19
|
-
task['proxyPassword'] = self.
|
15
|
+
task['proxyType'] = self.proxyType
|
16
|
+
task['proxyAddress'] = self.proxyAddress
|
17
|
+
task['proxyPort'] = self.proxyPort
|
18
|
+
task['proxyLogin'] = self.proxyLogin
|
19
|
+
task['proxyPassword'] = self.proxyPassword
|
20
20
|
if self.enterprisePayload is not None:
|
21
21
|
task['enterprisePayload'] = {'s': self.enterprisePayload}
|
22
22
|
if self.apiDomain is not None:
|
@@ -13,11 +13,11 @@ class RecaptchaV2Request(RecaptchaV2RequestBase, ProxyInfo):
|
|
13
13
|
task['type'] = self.type
|
14
14
|
task['websiteURL'] = self.websiteUrl
|
15
15
|
task['websiteKey'] = self.websiteKey
|
16
|
-
task['proxyType'] = self.
|
17
|
-
task['proxyAddress'] = self.
|
18
|
-
task['proxyPort'] = self.
|
19
|
-
task['proxyLogin'] = self.
|
20
|
-
task['proxyPassword'] = self.
|
16
|
+
task['proxyType'] = self.proxyType
|
17
|
+
task['proxyAddress'] = self.proxyAddress
|
18
|
+
task['proxyPort'] = self.proxyPort
|
19
|
+
task['proxyLogin'] = self.proxyLogin
|
20
|
+
task['proxyPassword'] = self.proxyPassword
|
21
21
|
|
22
22
|
if self.dataSValue is not None:
|
23
23
|
task['recaptchaDataSValue'] = self.dataSValue
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .TenDiCustomTaskRequestBase import TenDiCustomTaskRequestBase
|
5
|
+
|
6
|
+
class TenDiCustomTaskProxylessRequest(TenDiCustomTaskRequestBase):
|
7
|
+
|
8
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
9
|
+
task = {}
|
10
|
+
task['type'] = self.type
|
11
|
+
task['class'] = self.captchaClass
|
12
|
+
task['websiteURL'] = self.websiteUrl
|
13
|
+
task['websiteKey'] = self.websiteKey
|
14
|
+
if self.userAgent is not None:
|
15
|
+
task['userAgent'] = self.userAgent
|
16
|
+
return task
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from typing import Dict, Union
|
2
|
+
from pydantic import Field, validator
|
3
|
+
|
4
|
+
from .proxy_info import ProxyInfo
|
5
|
+
from .TenDiCustomTaskRequestBase import TenDiCustomTaskRequestBase
|
6
|
+
|
7
|
+
class TenDiCustomTaskRequest(TenDiCustomTaskRequestBase, ProxyInfo):
|
8
|
+
|
9
|
+
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
10
|
+
task = {}
|
11
|
+
task['type'] = self.type
|
12
|
+
task['class'] = self.captchaClass
|
13
|
+
task['websiteURL'] = self.websiteUrl
|
14
|
+
task['websiteKey'] = self.websiteKey
|
15
|
+
task['proxyType'] = self.proxyType
|
16
|
+
task['proxyAddress'] = self.proxyAddress
|
17
|
+
task['proxyPort'] = self.proxyPort
|
18
|
+
task['proxyLogin'] = self.proxyLogin
|
19
|
+
task['proxyPassword'] = self.proxyPassword
|
20
|
+
if self.userAgent is not None:
|
21
|
+
task['userAgent'] = self.userAgent
|
22
|
+
return task
|
@@ -0,0 +1,11 @@
|
|
1
|
+
from .baseRequest import BaseRequest, Field
|
2
|
+
from typing import Optional
|
3
|
+
from pydantic import validator, model_validator
|
4
|
+
from .CustomTaskRequestBase import CustomTaskRequestBase
|
5
|
+
|
6
|
+
|
7
|
+
class TenDiCustomTaskRequestBase(CustomTaskRequestBase):
|
8
|
+
|
9
|
+
type: str = Field(default='CustomTask')
|
10
|
+
captchaClass: str = Field(default='TenDI')
|
11
|
+
websiteKey: str = Field()
|
@@ -16,9 +16,19 @@ from .TurnstileRequest import TurnstileRequest
|
|
16
16
|
from .HcaptchaComplexImageTask import HcaptchaComplexImageTaskRequest
|
17
17
|
from .RecaptchaComplexImageTask import RecaptchaComplexImageTaskRequest
|
18
18
|
from .baseRequest import BaseRequest
|
19
|
+
from .DataDomeCustomTaskRequest import DataDomeCustomTaskRequest
|
20
|
+
from .DataDomeCustomTaskProxylessRequest import DataDomeCustomTaskProxylessRequest
|
21
|
+
from .TenDiCustomTaskRequest import TenDiCustomTaskRequest
|
22
|
+
from .TenDiCustomTaskProxylessRequest import TenDiCustomTaskProxylessRequest
|
23
|
+
from .BasiliskCustomTaskRequest import BasiliskCustomTaskRequest
|
24
|
+
from .BasiliskCustomTaskProxylessRequest import BasiliskCustomTaskProxylessRequest
|
25
|
+
from .AmazonWafRequest import AmazonWafRequest
|
26
|
+
from .AmazonWafProxylessRequest import AmazonWafProxylessRequest
|
19
27
|
|
20
28
|
REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2EnterpriseProxylessRequest',
|
21
29
|
'RecaptchaV2ProxylessRequest', 'RecaptchaV2Request', 'RecaptchaV3ProxylessRequest',
|
22
30
|
'ImageToTextRequest', 'FuncaptchaProxylessRequest', 'FuncaptchaRequest',
|
23
31
|
'GeetestRequest', 'GeetestProxylessRequest', 'HcaptchaProxylessRequest',
|
24
|
-
'HcaptchaRequest'
|
32
|
+
'HcaptchaRequest', 'DataDomeCustomTaskRequest', 'DataDomeCustomTaskProxylessRequest',
|
33
|
+
'TenDiCustomTaskRequest', 'TenDiCustomTaskProxylessRequest', 'BasiliskCustomTaskRequest',
|
34
|
+
'BasiliskCustomTaskProxylessRequest', 'AmazonWafRequest', 'AmazonWafProxylessRequest']
|
@@ -2,19 +2,19 @@ from pydantic import BaseModel, validator
|
|
2
2
|
from .enums import ProxyTypes
|
3
3
|
|
4
4
|
class ProxyInfo(BaseModel):
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
proxyType: str
|
6
|
+
proxyAddress: str
|
7
|
+
proxyPort: int
|
8
|
+
proxyLogin: str
|
9
|
+
proxyPassword: str
|
10
10
|
|
11
|
-
@validator('
|
11
|
+
@validator('proxyType')
|
12
12
|
def validate_proxy_type(cls, value):
|
13
13
|
if value not in ProxyTypes.list_values():
|
14
14
|
raise ValueError(f'Expected that proxy type will be in {ProxyTypes.list_values()}, got "{value}"')
|
15
15
|
return value
|
16
16
|
|
17
|
-
@validator('
|
17
|
+
@validator('proxyPort')
|
18
18
|
def validate_port(cls, value):
|
19
19
|
if not isinstance(value, int):
|
20
20
|
raise TypeError(f'Expect that port value will be <int> type, got {type(value)}')
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -0,0 +1,87 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: capmonstercloudclient
|
3
|
+
Version: 1.5.0
|
4
|
+
Summary: Official CapMonsterCloud Client: https://capmonster.cloud/
|
5
|
+
Home-page: https://github.com/ZennoLab/capmonstercloud-client-python
|
6
|
+
Author: Andrey Ilyin
|
7
|
+
Author-email: andrey.ilyin@zennolab.com
|
8
|
+
License: AGPL-3.0
|
9
|
+
Keywords: captcha
|
10
|
+
recaptcha
|
11
|
+
geetest
|
12
|
+
hcaptcha
|
13
|
+
funcaptcha
|
14
|
+
python3
|
15
|
+
python-library
|
16
|
+
capmonster
|
17
|
+
capmonstercloud
|
18
|
+
capmonstercloudclient
|
19
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
20
|
+
Classifier: Programming Language :: Python
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
22
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
23
|
+
Classifier: Programming Language :: Python :: 3.6
|
24
|
+
Classifier: Programming Language :: Python :: 3.7
|
25
|
+
Classifier: Programming Language :: Python :: 3.8
|
26
|
+
Classifier: Programming Language :: Python :: 3.9
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
28
|
+
Classifier: Development Status :: 5 - Production/Stable
|
29
|
+
Classifier: Framework :: AsyncIO
|
30
|
+
Classifier: Operating System :: Unix
|
31
|
+
Classifier: Operating System :: Microsoft :: Windows
|
32
|
+
Classifier: Operating System :: MacOS
|
33
|
+
Requires-Python: >=3.6
|
34
|
+
Description-Content-Type: text/markdown
|
35
|
+
License-File: LICENSE
|
36
|
+
Requires-Dist: aiohttp >=3.7.4
|
37
|
+
Requires-Dist: pydantic ==2.1.*
|
38
|
+
|
39
|
+
# Zennolab.CapMonsterCloud.Client
|
40
|
+
|
41
|
+
Official python client library for [capmonster.cloud](https://capmonster.cloud/) captcha recognition service
|
42
|
+
|
43
|
+
## Installation
|
44
|
+
|
45
|
+
python3 -m pip install capmonstercloudclient
|
46
|
+
|
47
|
+
## Usage
|
48
|
+
|
49
|
+
***
|
50
|
+
import asyncio
|
51
|
+
|
52
|
+
from capmonstercloudclient import CapMonsterClient, ClientOptions
|
53
|
+
from capmonstercloudclient.requests import RecaptchaV2ProxylessRequest
|
54
|
+
|
55
|
+
client_options = ClientOptions(api_key=<YOUR_API_KEY>)
|
56
|
+
cap_monster_client = CapMonsterClient(options=client_options)
|
57
|
+
|
58
|
+
async def solve_captcha():
|
59
|
+
return await cap_monster_client.solve_captcha(recaptcha2request)
|
60
|
+
|
61
|
+
recaptcha2request = RecaptchaV2ProxylessRequest(websiteUrl="https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
|
62
|
+
websiteKey="6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd")
|
63
|
+
|
64
|
+
responses = asyncio.run(solve_captcha())
|
65
|
+
print(responses)
|
66
|
+
***
|
67
|
+
|
68
|
+
Supported captcha recognition requests:
|
69
|
+
|
70
|
+
- [GeeTestProxylessRequest](https://zenno.link/doc-geetest-en)
|
71
|
+
- [GeeTestRequest](https://zenno.link/doc-geetest-proxy-en)
|
72
|
+
- [HCaptchaProxylessRequest](https://zenno.link/doc-hcaptcha-en)
|
73
|
+
- [HCaptchaRequest](https://zenno.link/doc-hcaptcha-proxy-en)
|
74
|
+
- [ImageToTextRequest](https://zenno.link/doc-ImageToTextTask-en)
|
75
|
+
- [RecaptchaV2ProxylessRequest](https://zenno.link/doc-recaptcha2-en)
|
76
|
+
- [RecaptchaV2Request](https://zenno.link/doc-recaptcha2-proxy-en)
|
77
|
+
- [RecaptchaV3ProxylessRequest](https://zenno.link/doc-recaptcha3-en)
|
78
|
+
- [RecaptchaV2EnterpriseProxylessRequest](https://zenno.link/doc-recaptcha2e-en)
|
79
|
+
- [RecaptchaV2EnterpriseRequest](https://zenno.link/doc-recaptcha2e-proxy-en)
|
80
|
+
- [TurnstileProxylessRequest](https://zenno.link/doc-turnstile-en)
|
81
|
+
- [TurnstileRequest](https://zenno.link/doc-turnstile-proxy-en)
|
82
|
+
- [RecaptchaComplexImageTaskRequest](https://zenno.link/doc-complextask-rc-en)
|
83
|
+
- [HcaptchaComplexImageTaskRequest](https://zenno.link/doc-complextask-hc-en)
|
84
|
+
- [DataDomeCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/datadome)
|
85
|
+
- [TenDiCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/tendi)
|
86
|
+
- [BasiliskCustomTaskRequest](https://docs.capmonster.cloud/docs/captchas/Basilisk-task)
|
87
|
+
- [AmazonWafRequest](https://docs.capmonster.cloud/docs/captchas/amazon-task)
|
@@ -0,0 +1,55 @@
|
|
1
|
+
capmonstercloudclient/CapMonsterCloudClient.py,sha256=-Xpkiefv3oF4gaKuGl9kRPSbonsVJ6RJbKTpZT9bzok,9216
|
2
|
+
capmonstercloudclient/GetResultTimeouts.py,sha256=Bt4gZ11lpXqGCYDvWx9SgABHmBtv6gqUnEDQliU-l58,1390
|
3
|
+
capmonstercloudclient/__init__.py,sha256=XkfS_v1jZUx7HTUhdi-5uiZhvjvd9aLvt31jXXpVxeA,92
|
4
|
+
capmonstercloudclient/captchaResult.py,sha256=qBRmadO9n6DMnG-IwJSzZEt54Z5OAXvWIC5Jvzd7OfI,314
|
5
|
+
capmonstercloudclient/clientOptions.py,sha256=kd2CXnmz2_crZd85SoOHOjp1zBklEbu9OWDpk-JfBf4,895
|
6
|
+
capmonstercloudclient/exceptions.py,sha256=9iTzO0ymBo7eAJwv7qtoPZTmb4yaQ6Fvi69VqBXTcwk,925
|
7
|
+
capmonstercloudclient/requestController.py,sha256=9t31zNN4z1UBw4Q0N9ZIy47CwSQl2VaxD1eqDTDIr9w,497
|
8
|
+
capmonstercloudclient/utils.py,sha256=hP090ddzDCLknr5wGCR7sIALDbOtWbiSzgZPvPnDC3c,609
|
9
|
+
capmonstercloudclient/version.txt,sha256=H03AltWPfSHjh1ZxrubymxIKuEIY-kfbLLU7yetbTaw,5
|
10
|
+
capmonstercloudclient/requests/AmazonWafProxylessRequest.py,sha256=lgNC-03ccOsWZJM9xuLChaWAgNkOpMz4jRmhsK6yi58,753
|
11
|
+
capmonstercloudclient/requests/AmazonWafRequest.py,sha256=vXw1AcTStr3NPFMSTUxi0ZuQ9ICEhwfhZ3m5BhSc6Jw,986
|
12
|
+
capmonstercloudclient/requests/AmazonWafRequestBase.py,sha256=Ie4Vv6OZpFPvy6gQyuwsNMGKHEI4qNFa6Z5RK3KUqEw,308
|
13
|
+
capmonstercloudclient/requests/BasiliskCustomTaskProxylessRequest.py,sha256=2Vg6DpzrE4QHbBGQLaWZWMNf6oIMORFWeRr8Dz3gRgY,573
|
14
|
+
capmonstercloudclient/requests/BasiliskCustomTaskRequest.py,sha256=Avlc4f7_wAGUJ1MyazmA7Up8A7krmc4Z8TcvlcKpYuI,840
|
15
|
+
capmonstercloudclient/requests/BasiliskCustomTaskRequestBase.py,sha256=dhBbn6ffPQRIV8Usg4GwPEhIK7d59fT3kKsjOrvuiUU,367
|
16
|
+
capmonstercloudclient/requests/ComplexImageTaskBase.py,sha256=7784BontlIxldtIEy9O4Id1nRo6abGpNJZl5z2KwusY,675
|
17
|
+
capmonstercloudclient/requests/CustomTaskRequestBase.py,sha256=qilOId-0g7kDeaE0ofmAqsCq0visR6SG5uxYD2xbKu4,518
|
18
|
+
capmonstercloudclient/requests/DataDomeCustomTaskProxylessRequest.py,sha256=ozFD8CWmGoAbKDRb3xy_JjpD7OsAdgSZSe0lpJvSXVw,1714
|
19
|
+
capmonstercloudclient/requests/DataDomeCustomTaskRequest.py,sha256=cW9Ysq7Gb5hgbiVduFGEACzx6vwZpNQkW1isJsX5S7A,2014
|
20
|
+
capmonstercloudclient/requests/DataDomeCustomTaskRequestBase.py,sha256=HuQaLwSsRVfUfyrkklmnK4YNo_gmhIwA5FrPm5dvThA,270
|
21
|
+
capmonstercloudclient/requests/FuncaptchaComplexImageTask.py,sha256=5Mo9mBAXUuAx2Cv_lGfNaZLrsEwfrqxSz3ZPDy2KXvY,3074
|
22
|
+
capmonstercloudclient/requests/FuncaptchaProxylessRequest.py,sha256=uyGOGoERkIFNUgWl3IiU952S4q_fHdoyrPfNcitKyZA,669
|
23
|
+
capmonstercloudclient/requests/FuncaptchaRequest.py,sha256=XXyOlMj0XBePQ911owryzGjFAcsCaLJo32kMXsQ_ptg,927
|
24
|
+
capmonstercloudclient/requests/FuncaptchaRequestBase.py,sha256=7SmgYEaojxjUcR21drbWTKM0umWZrJsyWrHWKyB8QVc,293
|
25
|
+
capmonstercloudclient/requests/GeetestProxylessRequest.py,sha256=A8-XRR0KEhGLhlOaLVLEZXDavQ86CjQl02bYZvcq84A,1161
|
26
|
+
capmonstercloudclient/requests/GeetestRequest.py,sha256=FDr0x5ShrnKelrk4XJnAAlMB4abf2wXPt6uGptMPx1A,1428
|
27
|
+
capmonstercloudclient/requests/GeetestRequestBase.py,sha256=eR6GMduiy6iyG0pBPpK-IZkRMEO2aj5r76m7QEzg1rE,699
|
28
|
+
capmonstercloudclient/requests/HcaptchaComplexImageTask.py,sha256=iOCd66A-cD7uVFFaeO8R0r-DrexEGaUGixg2F5ODBdU,5226
|
29
|
+
capmonstercloudclient/requests/HcaptchaProxylessRequest.py,sha256=fv3_1PMN4ABxXhq5wIqSd_vRS935aOKlDim_f1psXNM,892
|
30
|
+
capmonstercloudclient/requests/HcaptchaRequest.py,sha256=0e-yBeEWqk6-lXSxgcIWROrgbKyh1OICjDarbCp0AQg,1158
|
31
|
+
capmonstercloudclient/requests/HcaptchaRequestBase.py,sha256=eF2njtIx3akgiPwA_hW8IMASBW9IEtkXRf0YDL9w4zE,436
|
32
|
+
capmonstercloudclient/requests/ImageToTextRequest.py,sha256=iubmsWXBwpQKFSoqL2YugMCHjVRoj13HEH9BZbYley4,2492
|
33
|
+
capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=fhT5tJo8__Ffc0sr4v0SxG0_tvqQt4A301CdM0zA8PI,3299
|
34
|
+
capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py,sha256=4mD8Lv52K9rhEzwXEBefnN0sN8TGwOsGvoFVrU7T44A,965
|
35
|
+
capmonstercloudclient/requests/RecaptchaV2EnterpriseProxylessRequest.py,sha256=2B8tJXDwb_L-UHCJ0jz_ut116HzWk1EuDQBMfPOxSoc,718
|
36
|
+
capmonstercloudclient/requests/RecaptchaV2EnterpriseRequestBase.py,sha256=WVw4HZhsKlUwC-npXnZKUHNvcJWgWtK8ah0iqNg0oWw,297
|
37
|
+
capmonstercloudclient/requests/RecaptchaV2ProxylessRequest.py,sha256=rfrvXjOuy09RgACxhZk9M6aH32qiNM4qJtpkguky0i0,968
|
38
|
+
capmonstercloudclient/requests/RecaptchaV2Request.py,sha256=n2xhE9CH255nGChg1bc2cnQqTodehkUO9NZTPrJXcO8,995
|
39
|
+
capmonstercloudclient/requests/RecaptchaV2RequestBase.py,sha256=IMjBmB8y7KwZ-CPkbYC48w2ADoEDiEpoK4Kzd8_Wbo8,329
|
40
|
+
capmonstercloudclient/requests/RecaptchaV3ProxylessRequest.py,sha256=0IYCgNruZrVr0L7E4dfHE_Pv8DimkrH4PBkEPEv7dxw,1078
|
41
|
+
capmonstercloudclient/requests/TenDiCustomTaskProxylessRequest.py,sha256=_mxYiUwsjbSaQ-1J4DKjNbho8HIQCwwxW1LDQRU7y2I,561
|
42
|
+
capmonstercloudclient/requests/TenDiCustomTaskRequest.py,sha256=jWgGQaidkQHuJ8DeMMokQwlCKpI-5fhjoRQKflb6I6E,828
|
43
|
+
capmonstercloudclient/requests/TenDiCustomTaskRequestBase.py,sha256=3bnONuD0u9Qs2qZ6XCTV3G8tOqHQIgTm-sG4azHTikQ,361
|
44
|
+
capmonstercloudclient/requests/TurnstileProxylessRequest.py,sha256=ZRiBYYudP5z8J79YjjMf5PSgR9q1eWTCb1TWWfnIn10,342
|
45
|
+
capmonstercloudclient/requests/TurnstileRequest.py,sha256=xPH5EyXwvw3apI1YlUEcTktGP3wxkaRAWKpP6uqOguI,378
|
46
|
+
capmonstercloudclient/requests/TurnstileRequestBase.py,sha256=8zzcQLV1Sh7LVuMcEmhrxuPKkObNO0gHmVm1-jUFbI4,1958
|
47
|
+
capmonstercloudclient/requests/__init__.py,sha256=ljuazzIqpXE_2JustJQL-27wGFxWnN7lj_dMGKt_QBo,2287
|
48
|
+
capmonstercloudclient/requests/baseRequest.py,sha256=oVOtKdCfVhxQ9x4qDkIc1D_-q3B08hNQeUKrBLwkjaM,279
|
49
|
+
capmonstercloudclient/requests/enums.py,sha256=itJ95OEzwous9zOe4n411w5LeBw4yCpCCTMomlT3LU0,1000
|
50
|
+
capmonstercloudclient/requests/proxy_info.py,sha256=ctmxvykMflsym-snO449t9mOZ1jxpUFTnxcI8koACUw,678
|
51
|
+
capmonstercloudclient-1.5.0.dist-info/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
|
52
|
+
capmonstercloudclient-1.5.0.dist-info/METADATA,sha256=0wMB2CohrQXC5VC5fEYxjmybQprd0xFqIkQywliLdoA,3610
|
53
|
+
capmonstercloudclient-1.5.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
54
|
+
capmonstercloudclient-1.5.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
|
55
|
+
capmonstercloudclient-1.5.0.dist-info/RECORD,,
|
@@ -1,86 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: capmonstercloudclient
|
3
|
-
Version: 1.3.3
|
4
|
-
Summary: Official CapMonsterCloud Client: https://capmonster.cloud/
|
5
|
-
Home-page: https://github.com/ZennoLab/capmonstercloud-client-python
|
6
|
-
Author: Andrey Ilyin
|
7
|
-
Author-email: andrey.ilyin@zennolab.com
|
8
|
-
License: AGPL-3.0
|
9
|
-
Keywords: captcha
|
10
|
-
recaptcha
|
11
|
-
geetest
|
12
|
-
hcaptcha
|
13
|
-
funcaptcha
|
14
|
-
python3
|
15
|
-
python-library
|
16
|
-
capmonster
|
17
|
-
capmonstercloud
|
18
|
-
capmonstercloudclient
|
19
|
-
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
20
|
-
Classifier: Programming Language :: Python
|
21
|
-
Classifier: Programming Language :: Python :: 3
|
22
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
23
|
-
Classifier: Programming Language :: Python :: 3.6
|
24
|
-
Classifier: Programming Language :: Python :: 3.7
|
25
|
-
Classifier: Programming Language :: Python :: 3.8
|
26
|
-
Classifier: Programming Language :: Python :: 3.9
|
27
|
-
Classifier: Programming Language :: Python :: 3.10
|
28
|
-
Classifier: Development Status :: 5 - Production/Stable
|
29
|
-
Classifier: Framework :: AsyncIO
|
30
|
-
Classifier: Operating System :: Unix
|
31
|
-
Classifier: Operating System :: Microsoft :: Windows
|
32
|
-
Classifier: Operating System :: MacOS
|
33
|
-
Requires-Python: >=3.6
|
34
|
-
Description-Content-Type: text/markdown
|
35
|
-
License-File: LICENSE
|
36
|
-
Requires-Dist: aiohttp >=3.7.4
|
37
|
-
Requires-Dist: pydantic ==2.1.*
|
38
|
-
|
39
|
-
# Zennolab.CapMonsterCloud.Client
|
40
|
-
|
41
|
-
Official python client library for [capmonster.cloud](https://capmonster.cloud/) captcha recognition service
|
42
|
-
|
43
|
-
## Installation
|
44
|
-
|
45
|
-
python3 -m pip install capmonstercloudclient
|
46
|
-
|
47
|
-
## Usage
|
48
|
-
|
49
|
-
***
|
50
|
-
import asyncio
|
51
|
-
|
52
|
-
from capmonstercloudclient import CapMonsterClient, ClientOptions
|
53
|
-
from capmonstercloudclient.requests import RecaptchaV2ProxylessRequest
|
54
|
-
|
55
|
-
client_options = ClientOptions(api_key=<YOUR_API_KEY>)
|
56
|
-
cap_monster_client = CapMonsterClient(options=client_options)
|
57
|
-
|
58
|
-
async def solve_captcha():
|
59
|
-
return await cap_monster_client.solve_captcha(recaptcha2request)
|
60
|
-
|
61
|
-
recaptcha2request = RecaptchaV2ProxylessRequest(websiteUrl="https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
|
62
|
-
websiteKey="6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd")
|
63
|
-
|
64
|
-
responses = asyncio.run(solve_captcha())
|
65
|
-
print(responses)
|
66
|
-
***
|
67
|
-
|
68
|
-
Supported captcha recognition requests:
|
69
|
-
|
70
|
-
- [FunCaptchaProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/643629079/FunCaptchaTaskProxyless+solving+FunCaptcha)
|
71
|
-
- [FunCaptchaRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/735805497/FunCaptchaTask+solving+FunCaptcha)
|
72
|
-
- [GeeTestProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/1940291626/GeeTestTaskProxyless+GeeTest+captcha+recognition+without+proxy)
|
73
|
-
- [GeeTestRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/1940357159/GeeTestTask+GeeTest+captcha+recognition)
|
74
|
-
- [HCaptchaProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/1203240977/HCaptchaTaskProxyless+hCaptcha+puzzle+solving)
|
75
|
-
- [HCaptchaRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/1203240988/HCaptchaTask+hCaptcha+puzzle+solving)
|
76
|
-
- [ImageToTextRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/589863/ImageToTextTask)
|
77
|
-
- [RecaptchaV2ProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/373161985/NoCaptchaTaskProxyless+solving+Google+recaptcha)
|
78
|
-
- [RecaptchaV2Request](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/680689685/NoCaptchaTask+solving+Google+recaptcha)
|
79
|
-
- [RecaptchaV3ProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/566853650/RecaptchaV3TaskProxyless+solving+Google+ReCaptcha+v.3)
|
80
|
-
- [RecaptchaV2EnterpriseProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2178383893/RecaptchaV2EnterpriseTaskProxyless+solving+Google+reCAPTCHA+Enterprise+without+proxy)
|
81
|
-
- [RecaptchaV2EnterpriseRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2179104769/RecaptchaV2EnterpriseTask+solving+Google+reCAPTCHA+Enterprise)
|
82
|
-
- [TurnstileProxylessRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2257879047/TurnstileTaskProxyless+solving+Turnstile+without+proxy)
|
83
|
-
- [TurnstileRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2313814017/TurnstileTask+Cloudflare+Challenge)
|
84
|
-
- [RecaptchaComplexImageTaskRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2279538739/ComplexImageTask+Recaptcha+Google+captcha+solution)
|
85
|
-
- [HcaptchaComplexImageTaskRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2279604241/ComplexImageTask+HCaptcha+hCaptcha+captcha+solution)
|
86
|
-
- [FunCaptchaComplexImageTaskRequest](https://zennolab.atlassian.net/wiki/spaces/APIS/pages/2291400705/ComplexImageTask+Funcaptcha+Funcaptcha+solving)
|
@@ -1,42 +0,0 @@
|
|
1
|
-
capmonstercloudclient/CapMonsterCloudClient.py,sha256=WSheWUsOh_xekrtDfemp3R43oWbPFpQFji8BWaajlpg,8712
|
2
|
-
capmonstercloudclient/GetResultTimeouts.py,sha256=RP7_fD6EpQa7flkyHgcpb_jZoyHtGIWY0Z_R01dcCDs,1021
|
3
|
-
capmonstercloudclient/__init__.py,sha256=XkfS_v1jZUx7HTUhdi-5uiZhvjvd9aLvt31jXXpVxeA,92
|
4
|
-
capmonstercloudclient/captchaResult.py,sha256=qBRmadO9n6DMnG-IwJSzZEt54Z5OAXvWIC5Jvzd7OfI,314
|
5
|
-
capmonstercloudclient/clientOptions.py,sha256=kd2CXnmz2_crZd85SoOHOjp1zBklEbu9OWDpk-JfBf4,895
|
6
|
-
capmonstercloudclient/exceptions.py,sha256=ah-ppZvx7rQfWHsALyJbCc8Yn4GmVk5eSn4dIAQuI1I,878
|
7
|
-
capmonstercloudclient/requestController.py,sha256=9t31zNN4z1UBw4Q0N9ZIy47CwSQl2VaxD1eqDTDIr9w,497
|
8
|
-
capmonstercloudclient/utils.py,sha256=hP090ddzDCLknr5wGCR7sIALDbOtWbiSzgZPvPnDC3c,609
|
9
|
-
capmonstercloudclient/version.txt,sha256=pbg4E5bSWOYbKrcebHaTPc25w2I4kZ1HI9h4zfIedp8,5
|
10
|
-
capmonstercloudclient/requests/ComplexImageTaskBase.py,sha256=7784BontlIxldtIEy9O4Id1nRo6abGpNJZl5z2KwusY,675
|
11
|
-
capmonstercloudclient/requests/FuncaptchaComplexImageTask.py,sha256=5Mo9mBAXUuAx2Cv_lGfNaZLrsEwfrqxSz3ZPDy2KXvY,3074
|
12
|
-
capmonstercloudclient/requests/FuncaptchaProxylessRequest.py,sha256=uyGOGoERkIFNUgWl3IiU952S4q_fHdoyrPfNcitKyZA,669
|
13
|
-
capmonstercloudclient/requests/FuncaptchaRequest.py,sha256=rdfFtIgUoGySuyavM0_vWPnSeYN9v584uAjNLGu8Hew,932
|
14
|
-
capmonstercloudclient/requests/FuncaptchaRequestBase.py,sha256=7SmgYEaojxjUcR21drbWTKM0umWZrJsyWrHWKyB8QVc,293
|
15
|
-
capmonstercloudclient/requests/GeetestProxylessRequest.py,sha256=A8-XRR0KEhGLhlOaLVLEZXDavQ86CjQl02bYZvcq84A,1161
|
16
|
-
capmonstercloudclient/requests/GeetestRequest.py,sha256=uzMKQ2dkttK6uVVAjfdAGSfpXhHCL3SqhMUal7BgCwQ,1442
|
17
|
-
capmonstercloudclient/requests/GeetestRequestBase.py,sha256=eR6GMduiy6iyG0pBPpK-IZkRMEO2aj5r76m7QEzg1rE,699
|
18
|
-
capmonstercloudclient/requests/HcaptchaComplexImageTask.py,sha256=X5BRQ8F8h4ENGcaW4ketDT7Gu294gq9_UaIhGzcwDC4,3074
|
19
|
-
capmonstercloudclient/requests/HcaptchaProxylessRequest.py,sha256=PKj59OhSMPfLhIYMYaQIgeCOeUv4NvF3-9NCu2Gfw_k,779
|
20
|
-
capmonstercloudclient/requests/HcaptchaRequest.py,sha256=pcxVhov7YsqlIGP2gTVK6DVy8_ZXmgWU8tB59h8BuHs,1050
|
21
|
-
capmonstercloudclient/requests/HcaptchaRequestBase.py,sha256=wXb8SM6JC1JvVzijMcDYLYGdT4u1LjmtHJAQDZJOpjk,375
|
22
|
-
capmonstercloudclient/requests/ImageToTextRequest.py,sha256=iubmsWXBwpQKFSoqL2YugMCHjVRoj13HEH9BZbYley4,2492
|
23
|
-
capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=fhT5tJo8__Ffc0sr4v0SxG0_tvqQt4A301CdM0zA8PI,3299
|
24
|
-
capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py,sha256=IE6HQS0Ny9U335SNXXPUOtRJJY-nnAAfTZvxhIUdhtM,970
|
25
|
-
capmonstercloudclient/requests/RecaptchaV2EnterpriseProxylessRequest.py,sha256=2B8tJXDwb_L-UHCJ0jz_ut116HzWk1EuDQBMfPOxSoc,718
|
26
|
-
capmonstercloudclient/requests/RecaptchaV2EnterpriseRequestBase.py,sha256=WVw4HZhsKlUwC-npXnZKUHNvcJWgWtK8ah0iqNg0oWw,297
|
27
|
-
capmonstercloudclient/requests/RecaptchaV2ProxylessRequest.py,sha256=rfrvXjOuy09RgACxhZk9M6aH32qiNM4qJtpkguky0i0,968
|
28
|
-
capmonstercloudclient/requests/RecaptchaV2Request.py,sha256=wt5ulbBm52v3U3xbvBVzYRRQQNucM7nOao-PX0BO-AE,1000
|
29
|
-
capmonstercloudclient/requests/RecaptchaV2RequestBase.py,sha256=IMjBmB8y7KwZ-CPkbYC48w2ADoEDiEpoK4Kzd8_Wbo8,329
|
30
|
-
capmonstercloudclient/requests/RecaptchaV3ProxylessRequest.py,sha256=0IYCgNruZrVr0L7E4dfHE_Pv8DimkrH4PBkEPEv7dxw,1078
|
31
|
-
capmonstercloudclient/requests/TurnstileProxylessRequest.py,sha256=ZRiBYYudP5z8J79YjjMf5PSgR9q1eWTCb1TWWfnIn10,342
|
32
|
-
capmonstercloudclient/requests/TurnstileRequest.py,sha256=xPH5EyXwvw3apI1YlUEcTktGP3wxkaRAWKpP6uqOguI,378
|
33
|
-
capmonstercloudclient/requests/TurnstileRequestBase.py,sha256=8zzcQLV1Sh7LVuMcEmhrxuPKkObNO0gHmVm1-jUFbI4,1958
|
34
|
-
capmonstercloudclient/requests/__init__.py,sha256=9F8sztFJ7CKTu5i2qlIWQHe9WXSr6_Z4qKLWJcYbZaU,1474
|
35
|
-
capmonstercloudclient/requests/baseRequest.py,sha256=oVOtKdCfVhxQ9x4qDkIc1D_-q3B08hNQeUKrBLwkjaM,279
|
36
|
-
capmonstercloudclient/requests/enums.py,sha256=itJ95OEzwous9zOe4n411w5LeBw4yCpCCTMomlT3LU0,1000
|
37
|
-
capmonstercloudclient/requests/proxy_info.py,sha256=v20lUGibVcfeTfVUkzg2xuOc8c_kZ-9wqLr3TBw0HTE,685
|
38
|
-
capmonstercloudclient-1.3.3.dist-info/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
|
39
|
-
capmonstercloudclient-1.3.3.dist-info/METADATA,sha256=Xq7PUJHpeuJ4IreulC_uLMhF4_WyeQKIh7liDlIROgE,4727
|
40
|
-
capmonstercloudclient-1.3.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
41
|
-
capmonstercloudclient-1.3.3.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
|
42
|
-
capmonstercloudclient-1.3.3.dist-info/RECORD,,
|
File without changes
|
{capmonstercloudclient-1.3.3.dist-info → capmonstercloudclient-1.5.0.dist-info}/top_level.txt
RENAMED
File without changes
|