capmonstercloudclient 1.6.0__py3-none-any.whl → 3.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.
- capmonstercloudclient/CapMonsterCloudClient.py +36 -41
- capmonstercloudclient/GetResultTimeouts.py +3 -0
- capmonstercloudclient/requests/AmazonWafRequest.py +18 -11
- capmonstercloudclient/requests/BasiliskCustomTaskRequest.py +11 -9
- capmonstercloudclient/requests/BinanceTaskRequest.py +18 -11
- capmonstercloudclient/requests/CustomTaskRequestBase.py +3 -3
- capmonstercloudclient/requests/DataDomeCustomTaskRequest.py +9 -8
- capmonstercloudclient/requests/FuncaptchaRequest.py +15 -10
- capmonstercloudclient/requests/GeetestRequest.py +25 -10
- capmonstercloudclient/requests/HcaptchaRequest.py +16 -9
- capmonstercloudclient/requests/ImageToTextRequest.py +1 -1
- capmonstercloudclient/requests/ImpervaCustomTaskRequest.py +9 -8
- capmonstercloudclient/requests/RecaptchaComplexImageTask.py +2 -2
- capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py +14 -10
- capmonstercloudclient/requests/RecaptchaV2Request.py +14 -9
- capmonstercloudclient/requests/RecognitionComplexImageTaskRequest.py +45 -0
- capmonstercloudclient/requests/TenDiCustomTaskRequest.py +12 -10
- capmonstercloudclient/requests/TurnstileRequest.py +43 -5
- capmonstercloudclient/requests/__init__.py +15 -21
- capmonstercloudclient/requests/baseRequest.py +2 -1
- capmonstercloudclient/requests/baseRequestWithProxy.py +7 -0
- capmonstercloudclient/version.txt +1 -1
- {capmonstercloudclient-1.6.0.dist-info → capmonstercloudclient-3.0.0.dist-info}/METADATA +21 -4
- capmonstercloudclient-3.0.0.dist-info/RECORD +39 -0
- {capmonstercloudclient-1.6.0.dist-info → capmonstercloudclient-3.0.0.dist-info}/WHEEL +1 -1
- capmonstercloudclient/requests/AmazonWafProxylessRequest.py +0 -22
- capmonstercloudclient/requests/AmazonWafRequestBase.py +0 -13
- capmonstercloudclient/requests/BasiliskCustomTaskProxylessRequest.py +0 -16
- capmonstercloudclient/requests/BasiliskCustomTaskRequestBase.py +0 -11
- capmonstercloudclient/requests/BinanceTaskProxylessRequest.py +0 -17
- capmonstercloudclient/requests/BinanceTaskRequestBase.py +0 -11
- capmonstercloudclient/requests/DataDomeCustomTaskProxylessRequest.py +0 -36
- capmonstercloudclient/requests/DataDomeCustomTaskRequestBase.py +0 -8
- capmonstercloudclient/requests/FuncaptchaProxylessRequest.py +0 -18
- capmonstercloudclient/requests/FuncaptchaRequestBase.py +0 -10
- capmonstercloudclient/requests/GeetestProxylessRequest.py +0 -31
- capmonstercloudclient/requests/GeetestRequestBase.py +0 -20
- capmonstercloudclient/requests/HcaptchaProxylessRequest.py +0 -25
- capmonstercloudclient/requests/HcaptchaRequestBase.py +0 -13
- capmonstercloudclient/requests/ImpervaCustomTaskProxylessRequest.py +0 -33
- capmonstercloudclient/requests/ImpervaCustomTaskRequestBase.py +0 -8
- capmonstercloudclient/requests/RecaptchaV2EnterpriseProxylessRequest.py +0 -18
- capmonstercloudclient/requests/RecaptchaV2EnterpriseRequestBase.py +0 -11
- capmonstercloudclient/requests/RecaptchaV2ProxylessRequest.py +0 -30
- capmonstercloudclient/requests/RecaptchaV2RequestBase.py +0 -12
- capmonstercloudclient/requests/TenDiCustomTaskProxylessRequest.py +0 -16
- capmonstercloudclient/requests/TenDiCustomTaskRequestBase.py +0 -11
- capmonstercloudclient/requests/TurnstileProxylessRequest.py +0 -10
- capmonstercloudclient/requests/TurnstileRequestBase.py +0 -47
- capmonstercloudclient-1.6.0.dist-info/RECORD +0 -61
- {capmonstercloudclient-1.6.0.dist-info → capmonstercloudclient-3.0.0.dist-info/licenses}/LICENSE +0 -0
- {capmonstercloudclient-1.6.0.dist-info → capmonstercloudclient-3.0.0.dist-info}/top_level.txt +0 -0
@@ -1,13 +1,51 @@
|
|
1
|
-
from typing import Dict
|
2
|
-
from pydantic import Field
|
3
|
-
from .
|
4
|
-
from .proxy_info import ProxyInfo
|
1
|
+
from typing import Dict, Optional
|
2
|
+
from pydantic import Field, validator, model_validator
|
3
|
+
from .baseRequestWithProxy import BaseRequestWithProxy
|
5
4
|
|
6
5
|
|
7
|
-
class TurnstileRequest(
|
6
|
+
class TurnstileRequest(BaseRequestWithProxy):
|
8
7
|
|
9
8
|
type: str = Field(default="TurnstileTask")
|
9
|
+
websiteURL: str
|
10
|
+
websiteKey: str
|
11
|
+
pageAction: Optional[str] = Field(default=None)
|
12
|
+
data: Optional[str] = Field(default=None)
|
13
|
+
pageData: Optional[str] = Field(default=None)
|
14
|
+
userAgent: Optional[str] = Field(default=None)
|
15
|
+
cloudflareTaskType: Optional[str] = Field(default=None)
|
16
|
+
htmlPageBase64: Optional[str] = Field(default=None)
|
17
|
+
apiJsUrl: Optional[str] = Field(default=None)
|
10
18
|
|
19
|
+
@validator('cloudflareTaskType')
|
20
|
+
def validate_cloudflare_task(cls, value):
|
21
|
+
if value is not None:
|
22
|
+
if value not in ['cf_clearance', 'token']:
|
23
|
+
raise ValueError(f'cloudflareTaskType could be "cf_clearance" if you need cookie or ' \
|
24
|
+
f'"token" if required token from Turnstile.')
|
25
|
+
return value
|
26
|
+
|
27
|
+
@model_validator(mode='before')
|
28
|
+
def validate_cloudflare_type_token(self):
|
29
|
+
|
30
|
+
if self.get('htmlPageBase64') is None:
|
31
|
+
if self.get('cloudflareTaskType') == 'cf_clearance':
|
32
|
+
raise RuntimeError(f'Expect that "htmlPageBase64" will be filled ' \
|
33
|
+
f'when cloudflareTaskType is "cf_clearance"')
|
34
|
+
|
35
|
+
if self.get('cloudflareTaskType') == 'token':
|
36
|
+
for field in ['pageAction', 'pageData', 'data']:
|
37
|
+
if self.get(field) is None:
|
38
|
+
raise RuntimeError(f'Expect that "{field}" will be filled ' \
|
39
|
+
f'when "cloudflareTaskType" = "token".')
|
40
|
+
|
41
|
+
if self.get('cloudflareTaskType') is not None:
|
42
|
+
if self.get('cloudflareTaskType') in ['cf_clearance', 'token']:
|
43
|
+
if self.get('userAgent') is None:
|
44
|
+
raise RuntimeError(f'Expect that userAgent will be filled ' \
|
45
|
+
f'when cloudflareTaskType specified.')
|
46
|
+
|
47
|
+
return self
|
48
|
+
|
11
49
|
def getTaskDict(self) -> Dict[str, str]:
|
12
50
|
return {k: v for k, v in self.model_dump().items() if v is not None}
|
13
51
|
|
@@ -1,41 +1,35 @@
|
|
1
1
|
from .ImageToTextRequest import ImageToTextRequest
|
2
|
-
from .RecaptchaV2ProxylessRequest import RecaptchaV2ProxylessRequest
|
3
2
|
from .RecaptchaV2Request import RecaptchaV2Request
|
4
|
-
from .RecaptchaV2EnterpriseProxylessRequest import RecaptchaV2EnterpriseProxylessRequest
|
5
3
|
from .RecaptchaV2EnterpiseRequest import RecaptchaV2EnterpriseRequest
|
6
4
|
from .RecaptchaV3ProxylessRequest import RecaptchaV3ProxylessRequest
|
7
|
-
from .
|
5
|
+
from .RecaptchaComplexImageTask import RecaptchaComplexImageTaskRequest
|
8
6
|
from .HcaptchaRequest import HcaptchaRequest
|
9
|
-
from .FuncaptchaProxylessRequest import FuncaptchaProxylessRequest
|
10
7
|
from .FuncaptchaRequest import FuncaptchaRequest
|
11
8
|
from .FuncaptchaComplexImageTask import FunCaptchaComplexImageTaskRequest
|
12
|
-
from .GeetestProxylessRequest import GeetestProxylessRequest
|
13
9
|
from .GeetestRequest import GeetestRequest
|
14
|
-
from .TurnstileProxylessRequest import TurnstileProxylessRequest
|
15
10
|
from .TurnstileRequest import TurnstileRequest
|
16
11
|
from .HcaptchaComplexImageTask import HcaptchaComplexImageTaskRequest
|
17
12
|
from .RecaptchaComplexImageTask import RecaptchaComplexImageTaskRequest
|
18
13
|
from .baseRequest import BaseRequest
|
19
14
|
from .DataDomeCustomTaskRequest import DataDomeCustomTaskRequest
|
20
|
-
from .DataDomeCustomTaskProxylessRequest import DataDomeCustomTaskProxylessRequest
|
21
15
|
from .TenDiCustomTaskRequest import TenDiCustomTaskRequest
|
22
|
-
from .TenDiCustomTaskProxylessRequest import TenDiCustomTaskProxylessRequest
|
23
16
|
from .BasiliskCustomTaskRequest import BasiliskCustomTaskRequest
|
24
|
-
from .BasiliskCustomTaskProxylessRequest import BasiliskCustomTaskProxylessRequest
|
25
17
|
from .AmazonWafRequest import AmazonWafRequest
|
26
|
-
from .AmazonWafProxylessRequest import AmazonWafProxylessRequest
|
27
18
|
from .BinanceTaskRequest import BinanceTaskRequest
|
28
|
-
from .BinanceTaskProxylessRequest import BinanceTaskProxylessRequest
|
29
19
|
from .ImpervaCustomTaskRequest import ImpervaCustomTaskRequest
|
30
|
-
from .
|
20
|
+
from .RecognitionComplexImageTaskRequest import RecognitionComplexImageTaskRequest
|
31
21
|
|
32
22
|
|
33
|
-
REQUESTS = ['RecaptchaV2EnterpiseRequest', '
|
34
|
-
'
|
35
|
-
'
|
36
|
-
'
|
37
|
-
'
|
38
|
-
'
|
39
|
-
'
|
40
|
-
'
|
41
|
-
'
|
23
|
+
REQUESTS = ['RecaptchaV2EnterpiseRequest', 'RecaptchaV2Request', 'RecaptchaV3ProxylessRequest', 'RecaptchaComplexImageTaskRequest'
|
24
|
+
'ImageToTextRequest',
|
25
|
+
'FuncaptchaRequest', 'FunCaptchaComplexImageTaskRequest',
|
26
|
+
'HcaptchaRequest', 'HcaptchaComplexImageTaskRequest'
|
27
|
+
'GeetestRequest',
|
28
|
+
'DataDomeCustomTaskRequest',
|
29
|
+
'TenDiCustomTaskRequest',
|
30
|
+
'BasiliskCustomTaskRequest',
|
31
|
+
'AmazonWafRequest',
|
32
|
+
'BinanceTaskRequest',
|
33
|
+
'ImpervaCustomTaskRequest',
|
34
|
+
'TurnstileRequest',
|
35
|
+
'RecognitionComplexImageTaskRequest']
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: capmonstercloudclient
|
3
|
-
Version:
|
3
|
+
Version: 3.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:
|
37
|
-
Requires-Dist:
|
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
|
@@ -0,0 +1,39 @@
|
|
1
|
+
capmonstercloudclient/CapMonsterCloudClient.py,sha256=0IWzHunUgTsD2QqR1gbOuil4vMEDC5D4g5561W8Zl5o,9101
|
2
|
+
capmonstercloudclient/GetResultTimeouts.py,sha256=wgCXitjTsC6BYP3xjLqpW58xS55hsbqcf28IylxRS1E,1661
|
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=yRY_8h8fKwOQ3Ei92kcXlxj3cvUHp8687KWc4acSkCk,5
|
10
|
+
capmonstercloudclient/requests/AmazonWafRequest.py,sha256=8SrbFTcZg3YI-Fac19Ap1iVT3n3mFBFKB38K1Y9QrWo,1195
|
11
|
+
capmonstercloudclient/requests/BasiliskCustomTaskRequest.py,sha256=GJ7OCsdF-xlnsV6kOI3fdb8C7CyLE7Kr5W4oK_nGn18,913
|
12
|
+
capmonstercloudclient/requests/BinanceTaskRequest.py,sha256=9kD9y_4hZYXKOj2AYoiv--Z0De0Y7JChF9X09snMbZs,1013
|
13
|
+
capmonstercloudclient/requests/ComplexImageTaskBase.py,sha256=7784BontlIxldtIEy9O4Id1nRo6abGpNJZl5z2KwusY,675
|
14
|
+
capmonstercloudclient/requests/CustomTaskRequestBase.py,sha256=_e9pz7EmI-9cjIvvJOmWuEdimxuRoUnq5tvO5_S92IQ,539
|
15
|
+
capmonstercloudclient/requests/DataDomeCustomTaskRequest.py,sha256=ghsRcRmccdEh_DVsORG4IwnvydSP_pJLK59xPHmbE8Q,2068
|
16
|
+
capmonstercloudclient/requests/FuncaptchaComplexImageTask.py,sha256=5Mo9mBAXUuAx2Cv_lGfNaZLrsEwfrqxSz3ZPDy2KXvY,3074
|
17
|
+
capmonstercloudclient/requests/FuncaptchaRequest.py,sha256=R9BJQTR82Awet2cKAklcsb7pFHUbZD1S816mO647lMg,1133
|
18
|
+
capmonstercloudclient/requests/GeetestRequest.py,sha256=ZHwlHLaL68xa6TJk9LYwtQOcCxW6Xk0fu0ZlB7gxPKI,2034
|
19
|
+
capmonstercloudclient/requests/HcaptchaComplexImageTask.py,sha256=HGVJefD2h9GX4ILyCYNrew64ZkpFGf0UG1hxXIrg7v0,5240
|
20
|
+
capmonstercloudclient/requests/HcaptchaRequest.py,sha256=sa0FRLf-H-9MWlFrowMNED19EfkI_xbkNC6CMsR_pwg,1502
|
21
|
+
capmonstercloudclient/requests/ImageToTextRequest.py,sha256=1F7Gzq0qTuxjbl9XfFbszQUHNG7W5PthuiJBAO_VEug,2481
|
22
|
+
capmonstercloudclient/requests/ImpervaCustomTaskRequest.py,sha256=3NW5MXbcluusLVMw-Ac99csoz_0W5RqqJ58B-DA44rg,1821
|
23
|
+
capmonstercloudclient/requests/RecaptchaComplexImageTask.py,sha256=v7cqgTF5L2ADYHoskveB8v2h6cW68Av60tH7ek3hWNg,3281
|
24
|
+
capmonstercloudclient/requests/RecaptchaV2EnterpiseRequest.py,sha256=TiIV0-SWLUT4mwK8ZzChL3FCZwaizzVsZhzZo0KRgfk,1121
|
25
|
+
capmonstercloudclient/requests/RecaptchaV2Request.py,sha256=wq9IFNehhcVZ-bDzu1Yfq1oD_4I4KbtwRdUwwNaQNm8,1219
|
26
|
+
capmonstercloudclient/requests/RecaptchaV3ProxylessRequest.py,sha256=0IYCgNruZrVr0L7E4dfHE_Pv8DimkrH4PBkEPEv7dxw,1078
|
27
|
+
capmonstercloudclient/requests/RecognitionComplexImageTaskRequest.py,sha256=TzWoKqEAOrgll1LlEFTzB_7dbOKJywRScZCpLUgSMS8,1970
|
28
|
+
capmonstercloudclient/requests/TenDiCustomTaskRequest.py,sha256=OIhLd_ODD6MsvBl6wSVcOHuBn0rv-Cg4sEFd6Y0zrY4,903
|
29
|
+
capmonstercloudclient/requests/TurnstileRequest.py,sha256=-nB7ULt2qke4z4_m7rUzhL1wjjMXwJ3NS_rDGM3UBtY,2199
|
30
|
+
capmonstercloudclient/requests/__init__.py,sha256=svvVJKE6X1C6jpwgOlI84QYICAT_gNpUu-qZl1clNhA,1824
|
31
|
+
capmonstercloudclient/requests/baseRequest.py,sha256=wHYDtEoJbAiJQDFOKWSezLvlxTLO9LCD5v7t3dvfgSg,317
|
32
|
+
capmonstercloudclient/requests/baseRequestWithProxy.py,sha256=RwF1FXH19T9IyR4bbj-fC73huAgKewtJMJy2IvWurpA,230
|
33
|
+
capmonstercloudclient/requests/enums.py,sha256=itJ95OEzwous9zOe4n411w5LeBw4yCpCCTMomlT3LU0,1000
|
34
|
+
capmonstercloudclient/requests/proxy_info.py,sha256=ctmxvykMflsym-snO449t9mOZ1jxpUFTnxcI8koACUw,678
|
35
|
+
capmonstercloudclient-3.0.0.dist-info/licenses/LICENSE,sha256=VIIsA4331arqJBp_QqiY2cjVszTfuSt3I7uEUr4ouYw,1065
|
36
|
+
capmonstercloudclient-3.0.0.dist-info/METADATA,sha256=129S-u21SG1yVmpwu0XKOhpiA29xt2lCCulCMc0ZvE4,5462
|
37
|
+
capmonstercloudclient-3.0.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
38
|
+
capmonstercloudclient-3.0.0.dist-info/top_level.txt,sha256=_rR6-Wb02PxobU8D33r_0OONJgybsros2e9H8opYGnA,22
|
39
|
+
capmonstercloudclient-3.0.0.dist-info/RECORD,,
|
@@ -1,22 +0,0 @@
|
|
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
|
@@ -1,13 +0,0 @@
|
|
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)
|
@@ -1,16 +0,0 @@
|
|
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
|
@@ -1,11 +0,0 @@
|
|
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()
|
@@ -1,17 +0,0 @@
|
|
1
|
-
from typing import Dict, Union
|
2
|
-
|
3
|
-
from .BinanceTaskRequestBase import BinanceTaskRequestBase
|
4
|
-
|
5
|
-
|
6
|
-
class BinanceTaskProxylessRequest(BinanceTaskRequestBase):
|
7
|
-
type: str = 'BinanceTaskProxyless'
|
8
|
-
|
9
|
-
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
10
|
-
task = {}
|
11
|
-
task['type'] = self.type
|
12
|
-
task['validateId'] = self.validateId
|
13
|
-
task['websiteURL'] = self.websiteUrl
|
14
|
-
task['websiteKey'] = self.websiteKey
|
15
|
-
if self.userAgent is not None:
|
16
|
-
task['userAgent'] = self.userAgent
|
17
|
-
return task
|
@@ -1,11 +0,0 @@
|
|
1
|
-
from .baseRequest import BaseRequest, Field
|
2
|
-
from typing import Optional
|
3
|
-
|
4
|
-
|
5
|
-
class BinanceTaskRequestBase(BaseRequest):
|
6
|
-
|
7
|
-
type: str = Field(default='BinanceTask')
|
8
|
-
websiteKey: str = Field()
|
9
|
-
websiteUrl: str = Field()
|
10
|
-
validateId: str = Field()
|
11
|
-
userAgent: Optional[str] = None
|
@@ -1,36 +0,0 @@
|
|
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
|
@@ -1,8 +0,0 @@
|
|
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')
|
@@ -1,18 +0,0 @@
|
|
1
|
-
from pydantic import Field
|
2
|
-
from typing import Dict, Union
|
3
|
-
|
4
|
-
from .FuncaptchaRequestBase import FuncaptchaRequestBase
|
5
|
-
|
6
|
-
class FuncaptchaProxylessRequest(FuncaptchaRequestBase):
|
7
|
-
type: str = Field(default='FunCaptchaTaskProxyless')
|
8
|
-
|
9
|
-
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
10
|
-
task = {}
|
11
|
-
task['type'] = self.type
|
12
|
-
task['websiteURL'] = self.websiteUrl
|
13
|
-
task['websitePublicKey'] = self.websitePublicKey
|
14
|
-
if self.funcaptchaApiJSSubdomain is not None:
|
15
|
-
task['funcaptchaApiJSSubdomain'] = self.funcaptchaApiJSSubdomain
|
16
|
-
if self.data is not None:
|
17
|
-
task['data'] = self.data
|
18
|
-
return task
|
@@ -1,10 +0,0 @@
|
|
1
|
-
from pydantic import Field
|
2
|
-
from typing import Optional
|
3
|
-
|
4
|
-
from .baseRequest import BaseRequest
|
5
|
-
|
6
|
-
class FuncaptchaRequestBase(BaseRequest):
|
7
|
-
websiteUrl: str
|
8
|
-
websitePublicKey: str
|
9
|
-
funcaptchaApiJSSubdomain: Optional[str] = Field(default=None)
|
10
|
-
data: Optional[str] = Field(default=None)
|
@@ -1,31 +0,0 @@
|
|
1
|
-
from pydantic import Field
|
2
|
-
from typing import Dict, Union
|
3
|
-
|
4
|
-
from .GeetestRequestBase import GeetestRequestBase
|
5
|
-
|
6
|
-
class GeetestProxylessRequest(GeetestRequestBase):
|
7
|
-
type: str = Field(default='GeeTestTaskProxyless')
|
8
|
-
|
9
|
-
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
10
|
-
task = {}
|
11
|
-
task['type'] = self.type
|
12
|
-
task['websiteURL'] = self.websiteUrl
|
13
|
-
task['gt'] = self.gt
|
14
|
-
task['version'] = self.version
|
15
|
-
|
16
|
-
if self.version == 3:
|
17
|
-
if self.challenge is None:
|
18
|
-
raise ValueError(f'Challenge value is required for 3 version Geetest.')
|
19
|
-
task['challenge'] = self.challenge
|
20
|
-
|
21
|
-
if self.version == 4:
|
22
|
-
if self.initParameters is not None:
|
23
|
-
task['initParameters'] = self.initParameters
|
24
|
-
|
25
|
-
if self.geetestApiServerSubdomain is not None:
|
26
|
-
task['geetestApiServerSubdomain'] = self.geetestApiServerSubdomain
|
27
|
-
if self.geetestGetLib is not None:
|
28
|
-
task['geetestGetLib'] = self.geetestGetLib
|
29
|
-
if self.user_agent is not None:
|
30
|
-
task['userAgent'] = self.user_agent
|
31
|
-
return task
|
@@ -1,20 +0,0 @@
|
|
1
|
-
from pydantic import Field, validator
|
2
|
-
from typing import Dict, Optional
|
3
|
-
|
4
|
-
from .baseRequest import BaseRequest
|
5
|
-
|
6
|
-
class GeetestRequestBase(BaseRequest):
|
7
|
-
websiteUrl: str
|
8
|
-
gt: str
|
9
|
-
challenge: Optional[str] = Field(default=None)
|
10
|
-
version: int = Field(default=3)
|
11
|
-
initParameters: Optional[Dict] = Field(default=None)
|
12
|
-
geetestApiServerSubdomain: Optional[str] = Field(default=None)
|
13
|
-
geetestGetLib: Optional[str] = Field(default=None)
|
14
|
-
user_agent: Optional[str] = Field(default=None)
|
15
|
-
|
16
|
-
@validator('version')
|
17
|
-
def validate_version(cls, value):
|
18
|
-
if value not in [3, 4]:
|
19
|
-
raise ValueError(f"Geetest version could be 3 or 4, not {value}")
|
20
|
-
return value
|
@@ -1,25 +0,0 @@
|
|
1
|
-
from typing import Dict, Union
|
2
|
-
from pydantic import Field
|
3
|
-
|
4
|
-
from .HcaptchaRequestBase import HcaptchaRequestBase
|
5
|
-
|
6
|
-
|
7
|
-
class HcaptchaProxylessRequest(HcaptchaRequestBase):
|
8
|
-
type: str = Field(default='HCaptchaTaskProxyless')
|
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['websiteKey'] = self.websiteKey
|
15
|
-
if self.is_invisible is not None:
|
16
|
-
task['isInvisible'] = self.is_invisible
|
17
|
-
if self.data is not None:
|
18
|
-
task['data'] = self.data
|
19
|
-
if self.user_agent is not None:
|
20
|
-
task['userAgent'] = self.user_agent
|
21
|
-
if self.cookies is not None:
|
22
|
-
task['cookies'] = self.cookies
|
23
|
-
if self.fallbackToActualUA is not None:
|
24
|
-
task['fallbackToActualUA'] = self.fallbackToActualUA
|
25
|
-
return task
|
@@ -1,13 +0,0 @@
|
|
1
|
-
from pydantic import Field
|
2
|
-
from typing import Optional
|
3
|
-
|
4
|
-
from .baseRequest import BaseRequest
|
5
|
-
|
6
|
-
class HcaptchaRequestBase(BaseRequest):
|
7
|
-
websiteUrl: str
|
8
|
-
websiteKey: str
|
9
|
-
is_invisible: Optional[bool] = Field(default=None)
|
10
|
-
data: Optional[str] = Field(default=None)
|
11
|
-
user_agent: Optional[str] = Field(default=None)
|
12
|
-
cookies: Optional[str] = Field(default=None)
|
13
|
-
fallbackToActualUA: Optional[bool] = Field(default=None)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
from typing import Dict, Union
|
2
|
-
from pydantic import Field, validator
|
3
|
-
|
4
|
-
from .ImpervaCustomTaskRequestBase import ImpervaCustomTaskRequestBase
|
5
|
-
|
6
|
-
class ImpervaCustomTaskProxylessRequest(ImpervaCustomTaskRequestBase):
|
7
|
-
metadata : Dict[str, str]
|
8
|
-
|
9
|
-
@validator('metadata')
|
10
|
-
def validate_metadata(cls, value):
|
11
|
-
if value.get('incapsulaScriptBase64') is None:
|
12
|
-
raise TypeError(f'Expect that incapsulaScriptBase64 will be defined.')
|
13
|
-
else:
|
14
|
-
if not isinstance(value.get('incapsulaScriptBase64'), str):
|
15
|
-
raise TypeError(f'Expect that incapsulaScriptBase64 will be str.')
|
16
|
-
if value.get('incapsulaSessionCookie') is None:
|
17
|
-
raise TypeError(f'Expect that incapsulaSessionCookie will be defined.')
|
18
|
-
else:
|
19
|
-
if not isinstance(value.get('incapsulaSessionCookie'), str):
|
20
|
-
raise TypeError(f'Expect that incapsulaSessionCookie will be str.')
|
21
|
-
if value.get('reese84UrlEndpoint') is not None and not isinstance(value.get('incapsulaSessionCookie'), str):
|
22
|
-
raise TypeError(f'Expect that reese84UrlEndpoint will be str.')
|
23
|
-
return value
|
24
|
-
|
25
|
-
def getTaskDict(self) -> Dict[str, Union[str, int, bool]]:
|
26
|
-
task = {}
|
27
|
-
task['type'] = self.type
|
28
|
-
task['class'] = self.captchaClass
|
29
|
-
task['websiteURL'] = self.websiteUrl
|
30
|
-
task['metadata'] = self.metadata
|
31
|
-
if self.userAgent is not None:
|
32
|
-
task['userAgent'] = self.userAgent
|
33
|
-
return task
|
@@ -1,8 +0,0 @@
|
|
1
|
-
from typing import Dict, Union
|
2
|
-
from pydantic import Field
|
3
|
-
|
4
|
-
from .CustomTaskRequestBase import CustomTaskRequestBase
|
5
|
-
|
6
|
-
class ImpervaCustomTaskRequestBase(CustomTaskRequestBase):
|
7
|
-
type: str = Field(default='CustomTask')
|
8
|
-
captchaClass: str = Field(default='Imperva')
|
@@ -1,18 +0,0 @@
|
|
1
|
-
from typing import Dict, Union
|
2
|
-
from pydantic import Field
|
3
|
-
|
4
|
-
from .RecaptchaV2EnterpriseRequestBase import RecaptchaV2EnterpriseRequestBase
|
5
|
-
|
6
|
-
class RecaptchaV2EnterpriseProxylessRequest(RecaptchaV2EnterpriseRequestBase):
|
7
|
-
type: str = Field(default='RecaptchaV2EnterpriseTaskProxyless')
|
8
|
-
|
9
|
-
def getTaskDict(self) -> Dict[str, Union[str, Dict[str, str]]]:
|
10
|
-
task = {}
|
11
|
-
task['type'] = self.type
|
12
|
-
task['websiteURL'] = self.websiteUrl
|
13
|
-
task['websiteKey'] = self.websiteKey
|
14
|
-
if self.enterprisePayload is not None:
|
15
|
-
task['enterprisePayload'] = {'s': self.enterprisePayload}
|
16
|
-
if self.apiDomain is not None:
|
17
|
-
task['apiDomain'] = self.apiDomain
|
18
|
-
return task
|
@@ -1,11 +0,0 @@
|
|
1
|
-
from typing import Optional
|
2
|
-
from pydantic import Field
|
3
|
-
|
4
|
-
from .baseRequest import BaseRequest
|
5
|
-
|
6
|
-
|
7
|
-
class RecaptchaV2EnterpriseRequestBase(BaseRequest):
|
8
|
-
websiteUrl: str
|
9
|
-
websiteKey: str
|
10
|
-
enterprisePayload: Optional[str] = Field(default=None)
|
11
|
-
apiDomain: Optional[str] = Field(default=None)
|
@@ -1,30 +0,0 @@
|
|
1
|
-
from pydantic import Field, validator
|
2
|
-
from typing import Dict
|
3
|
-
from .RecaptchaV2RequestBase import RecaptchaV2RequestBase
|
4
|
-
|
5
|
-
class RecaptchaV2ProxylessRequest(RecaptchaV2RequestBase):
|
6
|
-
type: str = Field(default="NoCaptchaTaskProxyless")
|
7
|
-
|
8
|
-
@validator('*')
|
9
|
-
def check_data(cls, value):
|
10
|
-
if value is not None:
|
11
|
-
if not isinstance(value, str):
|
12
|
-
raise TypeError(f'Expect that type {value} will be "str", got {type(value)}')
|
13
|
-
return value
|
14
|
-
|
15
|
-
def getTaskDict(self) -> Dict[str, str]:
|
16
|
-
task = {}
|
17
|
-
task['type'] = self.type
|
18
|
-
task['websiteURL'] = self.websiteUrl
|
19
|
-
task['websiteKey'] = self.websiteKey
|
20
|
-
|
21
|
-
if self.dataSValue is not None:
|
22
|
-
task['recaptchaDataSValue'] = self.dataSValue
|
23
|
-
|
24
|
-
if self.userAgent is not None:
|
25
|
-
task['userAgent'] = self.userAgent
|
26
|
-
|
27
|
-
if self.cookies is not None:
|
28
|
-
task['cookies'] = self.cookies
|
29
|
-
|
30
|
-
return task
|
@@ -1,12 +0,0 @@
|
|
1
|
-
from pydantic import Field
|
2
|
-
from typing import Optional
|
3
|
-
|
4
|
-
from .baseRequest import BaseRequest
|
5
|
-
|
6
|
-
|
7
|
-
class RecaptchaV2RequestBase(BaseRequest):
|
8
|
-
websiteUrl: str
|
9
|
-
websiteKey: str
|
10
|
-
dataSValue: Optional[str] = Field(default=None)
|
11
|
-
userAgent: Optional[str] = Field(default=None)
|
12
|
-
cookies: Optional[str] = Field(default=None)
|
@@ -1,16 +0,0 @@
|
|
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
|