python-rucaptcha 6.7.0__py3-none-any.whl → 6.8.1__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.
- python_rucaptcha/__version__.py +1 -1
- python_rucaptcha/alibaba_captcha.py +94 -0
- python_rucaptcha/basilisk_captcha.py +72 -0
- python_rucaptcha/core/base.py +2 -2
- python_rucaptcha/core/enums.py +18 -0
- python_rucaptcha/core/result_handler.py +2 -2
- python_rucaptcha/incapsula_captcha.py +75 -0
- python_rucaptcha/tspd_captcha.py +73 -0
- python_rucaptcha/vk_captcha.py +8 -2
- {python_rucaptcha-6.7.0.dist-info → python_rucaptcha-6.8.1.dist-info}/METADATA +6 -2
- {python_rucaptcha-6.7.0.dist-info → python_rucaptcha-6.8.1.dist-info}/RECORD +14 -10
- {python_rucaptcha-6.7.0.dist-info → python_rucaptcha-6.8.1.dist-info}/WHEEL +1 -1
- {python_rucaptcha-6.7.0.dist-info → python_rucaptcha-6.8.1.dist-info}/licenses/LICENSE +0 -0
- {python_rucaptcha-6.7.0.dist-info → python_rucaptcha-6.8.1.dist-info}/top_level.txt +0 -0
python_rucaptcha/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "6.
|
|
1
|
+
__version__ = "6.8.1"
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
from typing import Union, Optional
|
|
2
|
+
|
|
3
|
+
from .core.base import BaseCaptcha
|
|
4
|
+
from .core.enums import AlibabaEnm
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AlibabaCaptcha(BaseCaptcha):
|
|
8
|
+
"""Solve Alibaba captcha with a proxyless or customer-provided proxy task."""
|
|
9
|
+
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
websiteURL: str,
|
|
13
|
+
sceneId: str,
|
|
14
|
+
prefix: str,
|
|
15
|
+
method: Union[str, AlibabaEnm] = AlibabaEnm.AlibabaTaskProxyless,
|
|
16
|
+
userId: Optional[str] = None,
|
|
17
|
+
userUserId: Optional[str] = None,
|
|
18
|
+
verifyType: Optional[str] = None,
|
|
19
|
+
region: Optional[str] = None,
|
|
20
|
+
userCertifyId: Optional[str] = None,
|
|
21
|
+
apiGetLib: Optional[str] = None,
|
|
22
|
+
userAgent: Optional[str] = None,
|
|
23
|
+
proxyType: Optional[str] = None,
|
|
24
|
+
proxyAddress: Optional[str] = None,
|
|
25
|
+
proxyPort: Optional[int] = None,
|
|
26
|
+
proxyLogin: Optional[str] = None,
|
|
27
|
+
proxyPassword: Optional[str] = None,
|
|
28
|
+
*args,
|
|
29
|
+
**kwargs,
|
|
30
|
+
):
|
|
31
|
+
"""
|
|
32
|
+
Args:
|
|
33
|
+
rucaptcha_key: User API key.
|
|
34
|
+
websiteURL: Full URL of the page where Alibaba captcha is loaded.
|
|
35
|
+
sceneId: Captcha scenario identifier.
|
|
36
|
+
prefix: Captcha initialization prefix from the loading request.
|
|
37
|
+
method: ``AlibabaTaskProxyless`` or ``AlibabaTask``.
|
|
38
|
+
userId: Optional website-side user or session identifier.
|
|
39
|
+
userUserId: Optional secondary user identifier.
|
|
40
|
+
verifyType: Optional verification mechanism type.
|
|
41
|
+
region: Optional Alibaba processing region.
|
|
42
|
+
userCertifyId: Optional verification identifier.
|
|
43
|
+
apiGetLib: Optional URL of the captcha JavaScript library.
|
|
44
|
+
userAgent: Optional browser User-Agent.
|
|
45
|
+
proxyType: Proxy type for ``AlibabaTask``.
|
|
46
|
+
proxyAddress: Proxy IP address or hostname.
|
|
47
|
+
proxyPort: Proxy port.
|
|
48
|
+
proxyLogin: Optional proxy login.
|
|
49
|
+
proxyPassword: Optional proxy password.
|
|
50
|
+
kwargs: Additional task parameters.
|
|
51
|
+
"""
|
|
52
|
+
super().__init__(method=method, *args, **kwargs)
|
|
53
|
+
|
|
54
|
+
if method not in AlibabaEnm.list_values():
|
|
55
|
+
raise ValueError(f"Invalid method parameter set, available - {AlibabaEnm.list_values()}")
|
|
56
|
+
|
|
57
|
+
task_data = {"websiteURL": websiteURL, "sceneId": sceneId, "prefix": prefix}
|
|
58
|
+
optional_data = {
|
|
59
|
+
"userId": userId,
|
|
60
|
+
"userUserId": userUserId,
|
|
61
|
+
"verifyType": verifyType,
|
|
62
|
+
"region": region,
|
|
63
|
+
"userCertifyId": userCertifyId,
|
|
64
|
+
"apiGetLib": apiGetLib,
|
|
65
|
+
"userAgent": userAgent,
|
|
66
|
+
}
|
|
67
|
+
task_data.update({key: value for key, value in optional_data.items() if value is not None})
|
|
68
|
+
|
|
69
|
+
if method == AlibabaEnm.AlibabaTask.value:
|
|
70
|
+
if not all([proxyType, proxyAddress, proxyPort]):
|
|
71
|
+
raise ValueError(
|
|
72
|
+
"Proxy parameters (proxyType, proxyAddress, proxyPort) are required for AlibabaTask"
|
|
73
|
+
)
|
|
74
|
+
task_data.update(
|
|
75
|
+
{
|
|
76
|
+
"proxyType": proxyType,
|
|
77
|
+
"proxyAddress": proxyAddress,
|
|
78
|
+
"proxyPort": proxyPort,
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
if proxyLogin is not None:
|
|
82
|
+
task_data["proxyLogin"] = proxyLogin
|
|
83
|
+
if proxyPassword is not None:
|
|
84
|
+
task_data["proxyPassword"] = proxyPassword
|
|
85
|
+
|
|
86
|
+
self.create_task_payload["task"].update(task_data)
|
|
87
|
+
|
|
88
|
+
def captcha_handler(self, **kwargs) -> dict:
|
|
89
|
+
"""Synchronously submit and poll the Alibaba task."""
|
|
90
|
+
return self._processing_response(**kwargs)
|
|
91
|
+
|
|
92
|
+
async def aio_captcha_handler(self) -> dict:
|
|
93
|
+
"""Asynchronously submit and poll the Alibaba task."""
|
|
94
|
+
return await self._aio_processing_response()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from typing import Union, Optional
|
|
2
|
+
|
|
3
|
+
from .core.base import BaseCaptcha
|
|
4
|
+
from .core.enums import BasiliskEnm
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class BasiliskCaptcha(BaseCaptcha):
|
|
8
|
+
"""Solve Basilisk captcha with a proxyless or customer-provided proxy task."""
|
|
9
|
+
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
websiteURL: str,
|
|
13
|
+
websiteKey: str,
|
|
14
|
+
method: Union[str, BasiliskEnm] = BasiliskEnm.BasiliskTaskProxyless,
|
|
15
|
+
userAgent: Optional[str] = None,
|
|
16
|
+
proxyType: Optional[str] = None,
|
|
17
|
+
proxyAddress: Optional[str] = None,
|
|
18
|
+
proxyPort: Optional[int] = None,
|
|
19
|
+
proxyLogin: Optional[str] = None,
|
|
20
|
+
proxyPassword: Optional[str] = None,
|
|
21
|
+
*args,
|
|
22
|
+
**kwargs,
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Args:
|
|
26
|
+
rucaptcha_key: User API key.
|
|
27
|
+
websiteURL: Full URL of the page where Basilisk is loaded.
|
|
28
|
+
websiteKey: The page's Basilisk data-sitekey value.
|
|
29
|
+
method: ``BasiliskTaskProxyless`` or ``BasiliskTask``.
|
|
30
|
+
userAgent: Optional browser User-Agent.
|
|
31
|
+
proxyType: Proxy type for ``BasiliskTask``.
|
|
32
|
+
proxyAddress: Proxy IP address or hostname.
|
|
33
|
+
proxyPort: Proxy port.
|
|
34
|
+
proxyLogin: Optional proxy login.
|
|
35
|
+
proxyPassword: Optional proxy password.
|
|
36
|
+
kwargs: Additional task parameters.
|
|
37
|
+
"""
|
|
38
|
+
super().__init__(method=method, *args, **kwargs)
|
|
39
|
+
|
|
40
|
+
if method not in BasiliskEnm.list_values():
|
|
41
|
+
raise ValueError(f"Invalid method parameter set, available - {BasiliskEnm.list_values()}")
|
|
42
|
+
|
|
43
|
+
task_data = {"websiteURL": websiteURL, "websiteKey": websiteKey}
|
|
44
|
+
if userAgent is not None:
|
|
45
|
+
task_data["userAgent"] = userAgent
|
|
46
|
+
|
|
47
|
+
if method == BasiliskEnm.BasiliskTask.value:
|
|
48
|
+
if not all([proxyType, proxyAddress, proxyPort]):
|
|
49
|
+
raise ValueError(
|
|
50
|
+
"Proxy parameters (proxyType, proxyAddress, proxyPort) are required for BasiliskTask"
|
|
51
|
+
)
|
|
52
|
+
task_data.update(
|
|
53
|
+
{
|
|
54
|
+
"proxyType": proxyType,
|
|
55
|
+
"proxyAddress": proxyAddress,
|
|
56
|
+
"proxyPort": proxyPort,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
if proxyLogin is not None:
|
|
60
|
+
task_data["proxyLogin"] = proxyLogin
|
|
61
|
+
if proxyPassword is not None:
|
|
62
|
+
task_data["proxyPassword"] = proxyPassword
|
|
63
|
+
|
|
64
|
+
self.create_task_payload["task"].update(task_data)
|
|
65
|
+
|
|
66
|
+
def captcha_handler(self, **kwargs) -> dict:
|
|
67
|
+
"""Synchronously submit and poll the Basilisk task."""
|
|
68
|
+
return self._processing_response(**kwargs)
|
|
69
|
+
|
|
70
|
+
async def aio_captcha_handler(self) -> dict:
|
|
71
|
+
"""Asynchronously submit and poll the Basilisk task."""
|
|
72
|
+
return await self._aio_processing_response()
|
python_rucaptcha/core/base.py
CHANGED
|
@@ -104,7 +104,7 @@ class BaseCaptcha:
|
|
|
104
104
|
return response.to_dict()
|
|
105
105
|
except Exception as error:
|
|
106
106
|
self.result.errorId = 12
|
|
107
|
-
self.result.errorCode =
|
|
107
|
+
self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
108
108
|
self.result.errorDescription = str(error)
|
|
109
109
|
return self.result.to_dict()
|
|
110
110
|
|
|
@@ -157,7 +157,7 @@ class BaseCaptcha:
|
|
|
157
157
|
return response.to_dict()
|
|
158
158
|
except Exception as error:
|
|
159
159
|
self.result.errorId = 12
|
|
160
|
-
self.result.errorCode =
|
|
160
|
+
self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
161
161
|
self.result.errorDescription = str(error)
|
|
162
162
|
return self.result.to_dict()
|
|
163
163
|
|
python_rucaptcha/core/enums.py
CHANGED
|
@@ -191,6 +191,24 @@ class BinanceCaptchaEnm(str, MyEnum):
|
|
|
191
191
|
BinanceTask = "BinanceTask"
|
|
192
192
|
|
|
193
193
|
|
|
194
|
+
class TSPDEnm(str, MyEnum):
|
|
195
|
+
TspdTask = "tspdtask"
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class BasiliskEnm(str, MyEnum):
|
|
199
|
+
BasiliskTaskProxyless = "BasiliskTaskProxyless"
|
|
200
|
+
BasiliskTask = "BasiliskTask"
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class AlibabaEnm(str, MyEnum):
|
|
204
|
+
AlibabaTaskProxyless = "AlibabaTaskProxyless"
|
|
205
|
+
AlibabaTask = "AlibabaTask"
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class IncapsulaEnm(str, MyEnum):
|
|
209
|
+
IncapsulaTask = "IncapsulaTask"
|
|
210
|
+
|
|
211
|
+
|
|
194
212
|
class YidunEnm(str, MyEnum):
|
|
195
213
|
YidunTaskProxyless = "YidunTaskProxyless"
|
|
196
214
|
YidunTask = "YidunTask"
|
|
@@ -55,7 +55,7 @@ def get_sync_result(
|
|
|
55
55
|
except Exception as error:
|
|
56
56
|
response_ser.status = "failed"
|
|
57
57
|
response_ser.errorId = 12
|
|
58
|
-
response_ser.errorCode = "
|
|
58
|
+
response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
59
59
|
response_ser.errorDescription = str(error)
|
|
60
60
|
return response_ser.to_dict()
|
|
61
61
|
|
|
@@ -110,6 +110,6 @@ async def get_async_result(
|
|
|
110
110
|
except Exception as error:
|
|
111
111
|
response_ser.status = "failed"
|
|
112
112
|
response_ser.errorId = 12
|
|
113
|
-
response_ser.errorCode = "
|
|
113
|
+
response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
|
|
114
114
|
response_ser.errorDescription = str(error)
|
|
115
115
|
return response_ser.to_dict()
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from typing import Union, Optional
|
|
2
|
+
|
|
3
|
+
from .core.base import BaseCaptcha
|
|
4
|
+
from .core.enums import IncapsulaEnm
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class IncapsulaCaptcha(BaseCaptcha):
|
|
8
|
+
"""Solve the cookie-based Imperva (Incapsula) captcha."""
|
|
9
|
+
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
websiteURL: str,
|
|
13
|
+
incapsulaScriptUrl: str,
|
|
14
|
+
incapsulaCookies: str,
|
|
15
|
+
proxyType: str,
|
|
16
|
+
proxyAddress: str,
|
|
17
|
+
proxyPort: int,
|
|
18
|
+
method: Union[str, IncapsulaEnm] = IncapsulaEnm.IncapsulaTask,
|
|
19
|
+
userAgent: Optional[str] = None,
|
|
20
|
+
reese84UrlEndpoint: Optional[str] = None,
|
|
21
|
+
proxyLogin: Optional[str] = None,
|
|
22
|
+
proxyPassword: Optional[str] = None,
|
|
23
|
+
*args,
|
|
24
|
+
**kwargs,
|
|
25
|
+
):
|
|
26
|
+
"""
|
|
27
|
+
Args:
|
|
28
|
+
rucaptcha_key: User API key.
|
|
29
|
+
websiteURL: Full URL of the page where Incapsula is loaded.
|
|
30
|
+
incapsulaScriptUrl: Incapsula JavaScript resource URL or name.
|
|
31
|
+
incapsulaCookies: Cookies received from the Incapsula challenge page.
|
|
32
|
+
proxyType: Proxy type: ``http``, ``socks4`` or ``socks5``.
|
|
33
|
+
proxyAddress: Proxy IP address or hostname.
|
|
34
|
+
proxyPort: Proxy port.
|
|
35
|
+
method: Captcha task type. Only ``IncapsulaTask`` is supported.
|
|
36
|
+
userAgent: Optional browser User-Agent.
|
|
37
|
+
reese84UrlEndpoint: Optional Reese84 fingerprint endpoint.
|
|
38
|
+
proxyLogin: Optional proxy login.
|
|
39
|
+
proxyPassword: Optional proxy password.
|
|
40
|
+
kwargs: Additional task parameters.
|
|
41
|
+
"""
|
|
42
|
+
super().__init__(method=method, *args, **kwargs)
|
|
43
|
+
|
|
44
|
+
if method not in IncapsulaEnm.list_values():
|
|
45
|
+
raise ValueError(f"Invalid method parameter set, available - {IncapsulaEnm.list_values()}")
|
|
46
|
+
|
|
47
|
+
task_data = {
|
|
48
|
+
"websiteURL": websiteURL,
|
|
49
|
+
"incapsulaScriptUrl": incapsulaScriptUrl,
|
|
50
|
+
"incapsulaCookies": incapsulaCookies,
|
|
51
|
+
"proxyType": proxyType,
|
|
52
|
+
"proxyAddress": proxyAddress,
|
|
53
|
+
"proxyPort": proxyPort,
|
|
54
|
+
}
|
|
55
|
+
optional_data = {
|
|
56
|
+
"userAgent": userAgent,
|
|
57
|
+
"reese84UrlEndpoint": reese84UrlEndpoint,
|
|
58
|
+
"proxyLogin": proxyLogin,
|
|
59
|
+
"proxyPassword": proxyPassword,
|
|
60
|
+
}
|
|
61
|
+
task_data.update({key: value for key, value in optional_data.items() if value is not None})
|
|
62
|
+
self.create_task_payload["task"].update(task_data)
|
|
63
|
+
|
|
64
|
+
def captcha_handler(self, **kwargs) -> dict:
|
|
65
|
+
"""Synchronously submit and poll the Incapsula task."""
|
|
66
|
+
return self._processing_response(**kwargs)
|
|
67
|
+
|
|
68
|
+
async def aio_captcha_handler(self) -> dict:
|
|
69
|
+
"""Asynchronously submit and poll the Incapsula task."""
|
|
70
|
+
return await self._aio_processing_response()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Imperva is the product name; keep an intuitive alias alongside the API name.
|
|
74
|
+
ImpervaCaptcha = IncapsulaCaptcha
|
|
75
|
+
ImpervaEnm = IncapsulaEnm
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from typing import Union, Optional
|
|
2
|
+
|
|
3
|
+
from .core.base import BaseCaptcha
|
|
4
|
+
from .core.enums import TSPDEnm
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TSPDCaptcha(BaseCaptcha):
|
|
8
|
+
"""Solve the cookie-based TSPD captcha using a static proxy session."""
|
|
9
|
+
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
websiteURL: str,
|
|
13
|
+
tspdcookie: str,
|
|
14
|
+
htmlPageBase64: str,
|
|
15
|
+
proxyType: str,
|
|
16
|
+
proxyAddress: str,
|
|
17
|
+
proxyPort: int,
|
|
18
|
+
method: Union[str, TSPDEnm] = TSPDEnm.TspdTask,
|
|
19
|
+
proxyLogin: Optional[str] = None,
|
|
20
|
+
proxyPassword: Optional[str] = None,
|
|
21
|
+
userAgent: Optional[str] = None,
|
|
22
|
+
*args,
|
|
23
|
+
**kwargs,
|
|
24
|
+
):
|
|
25
|
+
"""
|
|
26
|
+
Args:
|
|
27
|
+
rucaptcha_key: User API key.
|
|
28
|
+
websiteURL: Full URL of the page where TSPD is loaded.
|
|
29
|
+
tspdcookie: Cookies received from the TSPD challenge page.
|
|
30
|
+
htmlPageBase64: Full challenge-page HTML encoded as Base64.
|
|
31
|
+
proxyType: Proxy type: ``http``, ``socks4`` or ``socks5``.
|
|
32
|
+
proxyAddress: Proxy IP address or hostname.
|
|
33
|
+
proxyPort: Proxy port.
|
|
34
|
+
method: Captcha task type. Only ``tspdtask`` is supported.
|
|
35
|
+
proxyLogin: Optional proxy login.
|
|
36
|
+
proxyPassword: Optional proxy password.
|
|
37
|
+
userAgent: Browser User-Agent used to load the page.
|
|
38
|
+
kwargs: Additional task parameters.
|
|
39
|
+
|
|
40
|
+
Notes:
|
|
41
|
+
The proxy must use a static session and the same outbound IP must be
|
|
42
|
+
maintained while obtaining cookies, solving the task, and using the
|
|
43
|
+
returned cookies.
|
|
44
|
+
"""
|
|
45
|
+
super().__init__(method=method, *args, **kwargs)
|
|
46
|
+
|
|
47
|
+
if method not in TSPDEnm.list_values():
|
|
48
|
+
raise ValueError(f"Invalid method parameter set, available - {TSPDEnm.list_values()}")
|
|
49
|
+
|
|
50
|
+
task_data = {
|
|
51
|
+
"websiteURL": websiteURL,
|
|
52
|
+
"tspdcookie": tspdcookie,
|
|
53
|
+
"htmlPageBase64": htmlPageBase64,
|
|
54
|
+
"proxyType": proxyType,
|
|
55
|
+
"proxyAddress": proxyAddress,
|
|
56
|
+
"proxyPort": proxyPort,
|
|
57
|
+
}
|
|
58
|
+
if proxyLogin is not None:
|
|
59
|
+
task_data["proxyLogin"] = proxyLogin
|
|
60
|
+
if proxyPassword is not None:
|
|
61
|
+
task_data["proxyPassword"] = proxyPassword
|
|
62
|
+
if userAgent is not None:
|
|
63
|
+
task_data["userAgent"] = userAgent
|
|
64
|
+
|
|
65
|
+
self.create_task_payload["task"].update(task_data)
|
|
66
|
+
|
|
67
|
+
def captcha_handler(self, **kwargs) -> dict:
|
|
68
|
+
"""Synchronously submit and poll the TSPD task."""
|
|
69
|
+
return self._processing_response(**kwargs)
|
|
70
|
+
|
|
71
|
+
async def aio_captcha_handler(self) -> dict:
|
|
72
|
+
"""Asynchronously submit and poll the TSPD task."""
|
|
73
|
+
return await self._aio_processing_response()
|
python_rucaptcha/vk_captcha.py
CHANGED
|
@@ -7,7 +7,7 @@ from .core.enums import VKCaptchaEnm, SaveFormatsEnm
|
|
|
7
7
|
class VKCaptcha(BaseCaptcha):
|
|
8
8
|
def __init__(
|
|
9
9
|
self,
|
|
10
|
-
method: Union[str, VKCaptchaEnm] =
|
|
10
|
+
method: Union[str, VKCaptchaEnm, None] = None,
|
|
11
11
|
redirectUri: Optional[str] = None,
|
|
12
12
|
userAgent: Optional[str] = None,
|
|
13
13
|
proxyType: Optional[str] = None,
|
|
@@ -113,6 +113,12 @@ class VKCaptcha(BaseCaptcha):
|
|
|
113
113
|
|
|
114
114
|
https://rucaptcha.com/api-docs/vk-captcha
|
|
115
115
|
"""
|
|
116
|
+
# VKCaptchaTask is the default task type. Its required fields are only
|
|
117
|
+
# validated when VKCaptchaTask is selected explicitly via ``method``.
|
|
118
|
+
method_passed = method is not None
|
|
119
|
+
if method is None:
|
|
120
|
+
method = VKCaptchaEnm.VKCaptchaTask
|
|
121
|
+
|
|
116
122
|
super().__init__(method=method, *args, **kwargs)
|
|
117
123
|
|
|
118
124
|
if method not in VKCaptchaEnm.list_values():
|
|
@@ -123,7 +129,7 @@ class VKCaptcha(BaseCaptcha):
|
|
|
123
129
|
self.img_path = img_path
|
|
124
130
|
|
|
125
131
|
if method == VKCaptchaEnm.VKCaptchaTask:
|
|
126
|
-
if not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
|
|
132
|
+
if method_passed and not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
|
|
127
133
|
raise ValueError(
|
|
128
134
|
"redirectUri, userAgent, proxyType, proxyAddress, "
|
|
129
135
|
"and proxyPort are required for VKCaptchaTask"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-rucaptcha
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.8.1
|
|
4
4
|
Summary: Python 3.9+ RuCaptcha library with AIO module.
|
|
5
5
|
Author-email: AndreiDrang <python-captcha@pm.me>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
License-File: LICENSE
|
|
29
29
|
Requires-Dist: requests>=2.21.0
|
|
30
30
|
Requires-Dist: aiohttp>=3.9.2
|
|
31
|
-
Requires-Dist: msgspec<0.
|
|
31
|
+
Requires-Dist: msgspec<0.23,>=0.18
|
|
32
32
|
Requires-Dist: tenacity<10,>=8
|
|
33
33
|
Dynamic: license-file
|
|
34
34
|
|
|
@@ -198,6 +198,10 @@ token = asyncio.run(solve())
|
|
|
198
198
|
| KeyCaptcha | `KeyCaptcha` | KeyCAPTCHA service |
|
|
199
199
|
| Amazon WAF | `AmazonWaf` | AWS WAF challenge |
|
|
200
200
|
| ALTCHA | `AltchaCaptcha` | ALTCHA challenge |
|
|
201
|
+
| TSPD | `TSPDCaptcha` | Cookie-based TSPD protection |
|
|
202
|
+
| Basilisk | `BasiliskCaptcha` | Token-based Basilisk challenge |
|
|
203
|
+
| Alibaba | `AlibabaCaptcha` | Token-based Alibaba challenge |
|
|
204
|
+
| Imperva/Incapsula | `IncapsulaCaptcha` | Cookie-based Imperva protection |
|
|
201
205
|
| Binance | `BinanceCaptcha` | Token-based Binance challenge |
|
|
202
206
|
| Grid | `GridCaptcha` | Select grid cells |
|
|
203
207
|
| Coordinates | `CoordinatesCaptcha` | Click on coordinates |
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
python_rucaptcha/__init__.py,sha256=odkQWtwx2RgIjD8pw2ZF-KR-5nL0Yu2Wn7Mu2YdBrSk,61
|
|
2
|
-
python_rucaptcha/__version__.py,sha256=
|
|
2
|
+
python_rucaptcha/__version__.py,sha256=Ojys-6ELHts8Ft-DHKXSSpNh8d7X8vH6hUmJdZyismQ,22
|
|
3
|
+
python_rucaptcha/alibaba_captcha.py,sha256=YiZ3ACv_UTf-RvqlaOyKKHvHp30xQ8YdHnkjIpQ32LE,3768
|
|
3
4
|
python_rucaptcha/altcha_captcha.py,sha256=ZZdNUWikyC5LTGCSVnqSrmmgw6TSfRcp44CagBBOHsE,5146
|
|
4
5
|
python_rucaptcha/amazon_waf.py,sha256=psEg-sym8xQlMPPto1ND_HE0vGV_SRRrDnsKuEbbxNA,3625
|
|
5
6
|
python_rucaptcha/atb_captcha.py,sha256=FuGG9MKTy7f_Sku7WQLZ7TCZ1ISFnu_0h4I3_Qri8JQ,3724
|
|
6
7
|
python_rucaptcha/audio_captcha.py,sha256=Bp6-gF3cTnYL8aeY8k4D4Ii7zPqy1Qo2OFRooSEd0MQ,5600
|
|
8
|
+
python_rucaptcha/basilisk_captcha.py,sha256=_EYvEk-PXosohx8U1mRDHbFm3Hnu4WeE0Nq0tEHeD7o,2752
|
|
7
9
|
python_rucaptcha/binance_captcha.py,sha256=7RlhY0ZUMcQkBt7y03vCx6lOllH5PxoxYAoB2R4T3RE,5760
|
|
8
10
|
python_rucaptcha/bounding_box_captcha.py,sha256=JvJEU1Y0A1SVkJV9jEFgBQ7Nis-vFkTmfUBoHIeTinY,10648
|
|
9
11
|
python_rucaptcha/captcha_fox.py,sha256=sm2cusbBYeOtMMZmZn51o0rtX8SQzPR_6oYmUSVWTCc,4101
|
|
@@ -21,6 +23,7 @@ python_rucaptcha/gee_test.py,sha256=lxhqWm2uWWS_uQK5ufArjr-508pfecDYAEh4Ct-FthI,
|
|
|
21
23
|
python_rucaptcha/grid_captcha.py,sha256=ssfl1BnBzxR1CHGdnjEG4wunTvEk9NvGIoiXQWHrt20,9001
|
|
22
24
|
python_rucaptcha/hcaptcha.py,sha256=7i0S7A4LvBePUgVsCGpay8733Ve2rzjiZcR-CMTwa8s,3732
|
|
23
25
|
python_rucaptcha/image_captcha.py,sha256=mSLmqAbN2hO47FA-lm4q7PNakBKeEv1-Yt6jDF_q9-s,8448
|
|
26
|
+
python_rucaptcha/incapsula_captcha.py,sha256=TYs8gbb0lQgEg-1xkRKyfL5Zf1KtNGv35Zm2ID4YE1s,2855
|
|
24
27
|
python_rucaptcha/key_captcha.py,sha256=hufzqYEb3ZR23AsLWIL82HFTJnA8JsOJtXUA92b9tws,4017
|
|
25
28
|
python_rucaptcha/lemin_captcha.py,sha256=inEq-UWUbMX9aZdpyZBGRER-67YCS3PqxnDIpPAzmqM,4086
|
|
26
29
|
python_rucaptcha/mt_captcha.py,sha256=usQK_LR9piDQM7lxkZbSKi6KIXedIBYyytKJBJe8jNg,3415
|
|
@@ -30,22 +33,23 @@ python_rucaptcha/rotate_captcha.py,sha256=o9y9SVLPI6G6NqK1siv3xbOSYm7PGNquJbbhXu
|
|
|
30
33
|
python_rucaptcha/temu_captcha.py,sha256=Uny8OY-g4Nbl4_X8wZM8TsZzivG1r12AuPhYpdIM-fI,5830
|
|
31
34
|
python_rucaptcha/tencent.py,sha256=f7lnRBUl-X5rL2FNRnrlh9ITRCcerTaS6XGUXnQdnOA,3649
|
|
32
35
|
python_rucaptcha/text_captcha.py,sha256=lZDPwTgpMLvqvfjPbT-uNuNu6JRdWTEE9qfjnRQ5y-A,3708
|
|
36
|
+
python_rucaptcha/tspd_captcha.py,sha256=yk33_IOKenHFxnVC7dKGaRG2bcS_Q67kO-qhDc_XnZg,2679
|
|
33
37
|
python_rucaptcha/turnstile.py,sha256=VpmYGYJoRVX6NHipO6-g2U5EpwxZToAZRmULj4ReDD0,3686
|
|
34
|
-
python_rucaptcha/vk_captcha.py,sha256=
|
|
38
|
+
python_rucaptcha/vk_captcha.py,sha256=mgKYMwsUFuTWatLpOR9uxlUkOG5qSn3FPvjFyWkh1o0,8775
|
|
35
39
|
python_rucaptcha/yandex_smart_captcha.py,sha256=V21WQdDND0r0FAmYN9zYpBeKuna20PsdMsqgCuGGlPI,10237
|
|
36
40
|
python_rucaptcha/yidun_captcha.py,sha256=aLpddgc-beVe_x0Ts028Jgg1uk_DQhSQGU7fh_dYkVM,6612
|
|
37
41
|
python_rucaptcha/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
-
python_rucaptcha/core/base.py,sha256=
|
|
42
|
+
python_rucaptcha/core/base.py,sha256=YK4xs_BOUfihJbdK4_eCddKwezsapmN7CFHAYjWO5Ww,11694
|
|
39
43
|
python_rucaptcha/core/captchaai.py,sha256=5Kh2dGfTL_3tMdBH3khq38H3q9KqLud8szaSwhL01Aw,23764
|
|
40
44
|
python_rucaptcha/core/config.py,sha256=ocoPeMXfn-2iqaqcjewZWfRpu73D5dY2AL2zqXVrG9Q,613
|
|
41
|
-
python_rucaptcha/core/enums.py,sha256=
|
|
42
|
-
python_rucaptcha/core/result_handler.py,sha256=
|
|
45
|
+
python_rucaptcha/core/enums.py,sha256=KJIEoXEQEzxEidQ-E728zNzaAvwOLYlZCFQovcWxIZg,5156
|
|
46
|
+
python_rucaptcha/core/result_handler.py,sha256=3QjdaZlAf7XOLNEtwWDMA99TQXZSh6W6JiGPxxVBZOY,5100
|
|
43
47
|
python_rucaptcha/core/serializer.py,sha256=TFYkV6Feq_FTo7NqTpTo_jzKj2aGYKg5CztMTTHouwQ,2970
|
|
44
48
|
python_rucaptcha/core/data/__init__.py,sha256=_DueAqmAAsgx7F2zYG_3_UoR8oJRNg9Xu4Tczn0f0bo,44
|
|
45
49
|
python_rucaptcha/core/data/captchaai_legacy_profiles.json,sha256=GkNDw4q9hTnkoL0XpsWh0oVzkBwSRVEXigRg7f05MN0,2878
|
|
46
50
|
python_rucaptcha/core/data/captchaai_profiles.json,sha256=bzxmOTWr-pzVeE2NpdXZRywLs20bGcaGY7HYszqQ5qY,3097
|
|
47
|
-
python_rucaptcha-6.
|
|
48
|
-
python_rucaptcha-6.
|
|
49
|
-
python_rucaptcha-6.
|
|
50
|
-
python_rucaptcha-6.
|
|
51
|
-
python_rucaptcha-6.
|
|
51
|
+
python_rucaptcha-6.8.1.dist-info/licenses/LICENSE,sha256=ZQeZG4IrO4YywdTal32gqyyrwdMlrMa3EwJCbgM8b2k,1063
|
|
52
|
+
python_rucaptcha-6.8.1.dist-info/METADATA,sha256=CTN6EnL-i6eAm4WbYiUfRc5kL0FKETWHG8cSYt-Uknw,8657
|
|
53
|
+
python_rucaptcha-6.8.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
54
|
+
python_rucaptcha-6.8.1.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
|
|
55
|
+
python_rucaptcha-6.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|