python-rucaptcha 6.3.1__py3-none-any.whl → 6.3.2__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/atb_captcha.py +1 -0
- python_rucaptcha/control.py +5 -0
- python_rucaptcha/core/enums.py +5 -0
- python_rucaptcha/prosopo.py +108 -0
- python_rucaptcha/tencent.py +1 -0
- {python_rucaptcha-6.3.1.dist-info → python_rucaptcha-6.3.2.dist-info}/METADATA +12 -10
- {python_rucaptcha-6.3.1.dist-info → python_rucaptcha-6.3.2.dist-info}/RECORD +11 -10
- {python_rucaptcha-6.3.1.dist-info → python_rucaptcha-6.3.2.dist-info}/WHEEL +1 -1
- {python_rucaptcha-6.3.1.dist-info → python_rucaptcha-6.3.2.dist-info}/LICENSE +0 -0
- {python_rucaptcha-6.3.1.dist-info → python_rucaptcha-6.3.2.dist-info}/top_level.txt +0 -0
python_rucaptcha/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "6.3.
|
|
1
|
+
__version__ = "6.3.2"
|
python_rucaptcha/atb_captcha.py
CHANGED
python_rucaptcha/control.py
CHANGED
|
@@ -55,10 +55,15 @@ class Control(BaseCaptcha):
|
|
|
55
55
|
|
|
56
56
|
Notes:
|
|
57
57
|
https://rucaptcha.com/api-docs/get-balance
|
|
58
|
+
|
|
58
59
|
https://rucaptcha.com/api-docs/report-correct
|
|
60
|
+
|
|
59
61
|
https://rucaptcha.com/api-docs/report-incorrect
|
|
62
|
+
|
|
60
63
|
https://2captcha.com/api-docs/get-balance
|
|
64
|
+
|
|
61
65
|
https://2captcha.com/api-docs/report-correct
|
|
66
|
+
|
|
62
67
|
https://2captcha.com/api-docs/report-incorrect
|
|
63
68
|
"""
|
|
64
69
|
|
python_rucaptcha/core/enums.py
CHANGED
|
@@ -159,3 +159,8 @@ class TencentEnm(str, MyEnum):
|
|
|
159
159
|
class atbCaptchaEnm(str, MyEnum):
|
|
160
160
|
AtbCaptchaTask = "AtbCaptchaTask"
|
|
161
161
|
AtbCaptchaTaskProxyless = "AtbCaptchaTaskProxyless"
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class ProsopoEnm(str, MyEnum):
|
|
165
|
+
ProsopoTask = "ProsopoTask"
|
|
166
|
+
ProsopoTaskProxyless = "ProsopoTaskProxyless "
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
from typing import Union
|
|
2
|
+
|
|
3
|
+
from .core.base import BaseCaptcha
|
|
4
|
+
from .core.enums import ProsopoEnm
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Prosopo(BaseCaptcha):
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
websiteURL: str,
|
|
11
|
+
websiteKey: str,
|
|
12
|
+
method: Union[str, ProsopoEnm] = ProsopoEnm.ProsopoTaskProxyless,
|
|
13
|
+
*args,
|
|
14
|
+
**kwargs,
|
|
15
|
+
):
|
|
16
|
+
"""
|
|
17
|
+
The class is used to work with Prosopo.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
rucaptcha_key: User API key
|
|
21
|
+
websiteURL: The full URL of target web page where the captcha is loaded.
|
|
22
|
+
We do not open the page, not a problem if it is available
|
|
23
|
+
only for authenticated users
|
|
24
|
+
websiteKey: The value of `siteKey` parameter found on the page.
|
|
25
|
+
method: Captcha type
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
>>> Prosopo(rucaptcha_key="aa9011f31111181111168611f1151122",
|
|
29
|
+
... websiteURL="https://www.example.com/",
|
|
30
|
+
... websiteKey="5EPQoMZEDc5LpN7gtxMMzYPTzA6UeWqL2stk1rso9gy4Ahqt",
|
|
31
|
+
... method=ProsopoEnm.ProsopoTaskProxyless.value,
|
|
32
|
+
... ).captcha_handler()
|
|
33
|
+
{
|
|
34
|
+
"errorId":0,
|
|
35
|
+
"status":"ready",
|
|
36
|
+
"solution":{
|
|
37
|
+
"token": "0x00016c68747470733950547a4136",
|
|
38
|
+
},
|
|
39
|
+
"cost":"0.00299",
|
|
40
|
+
"ip":"1.2.3.4",
|
|
41
|
+
"createTime":1692863536,
|
|
42
|
+
"endTime":1692863556,
|
|
43
|
+
"solveCount":1,
|
|
44
|
+
"taskId":75190409731
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
>>> await Prosopo(rucaptcha_key="aa9011f31111181111168611f1151122",
|
|
48
|
+
... websiteURL="https://www.example.com/",
|
|
49
|
+
... websiteKey="5EPQoMZEDc5LpN7gtxMMzYPTzA6UeWqL2stk1rso9gy4Ahqt",
|
|
50
|
+
... method=ProsopoEnm.ProsopoTaskProxyless.value,
|
|
51
|
+
... ).aio_captcha_handler()
|
|
52
|
+
{
|
|
53
|
+
"errorId":0,
|
|
54
|
+
"status":"ready",
|
|
55
|
+
"solution":{
|
|
56
|
+
"token": "0x00016c68747470733950547a4136",
|
|
57
|
+
},
|
|
58
|
+
"cost":"0.00299",
|
|
59
|
+
"ip":"1.2.3.4",
|
|
60
|
+
"createTime":1692863536,
|
|
61
|
+
"endTime":1692863556,
|
|
62
|
+
"solveCount":1,
|
|
63
|
+
"taskId":75190409731
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Dict with full server response
|
|
68
|
+
|
|
69
|
+
Notes:
|
|
70
|
+
https://rucaptcha.com/api-docs/prosopo-procaptcha
|
|
71
|
+
|
|
72
|
+
https://rucaptcha.com/api-docs/prosopo-procaptcha
|
|
73
|
+
"""
|
|
74
|
+
super().__init__(method=method, *args, **kwargs)
|
|
75
|
+
|
|
76
|
+
self.create_task_payload["task"].update({"websiteURL": websiteURL, "websiteKey": websiteKey})
|
|
77
|
+
|
|
78
|
+
# check user params
|
|
79
|
+
if method not in ProsopoEnm.list_values():
|
|
80
|
+
raise ValueError(f"Invalid method parameter set, available - {ProsopoEnm.list_values()}")
|
|
81
|
+
|
|
82
|
+
def captcha_handler(self, **kwargs) -> dict:
|
|
83
|
+
"""
|
|
84
|
+
Sync solving method
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
kwargs: additional params for `requests` library
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Dict with full server response
|
|
91
|
+
|
|
92
|
+
Notes:
|
|
93
|
+
Check class docstirng for more info
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
return self._processing_response(**kwargs)
|
|
97
|
+
|
|
98
|
+
async def aio_captcha_handler(self) -> dict:
|
|
99
|
+
"""
|
|
100
|
+
Async solving method
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Dict with full server response
|
|
104
|
+
|
|
105
|
+
Notes:
|
|
106
|
+
Check class docstirng for more info
|
|
107
|
+
"""
|
|
108
|
+
return await self._aio_processing_response()
|
python_rucaptcha/tencent.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: python-rucaptcha
|
|
3
|
-
Version: 6.3.
|
|
3
|
+
Version: 6.3.2
|
|
4
4
|
Summary: Python 3.9+ RuCaptcha library with AIO module.
|
|
5
5
|
Author-email: AndreiDrang <python-captcha@pm.me>
|
|
6
6
|
License: MIT License
|
|
@@ -29,7 +29,7 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
Requires-Dist: requests>=2.21.0
|
|
31
31
|
Requires-Dist: aiohttp>=3.9.2
|
|
32
|
-
Requires-Dist: msgspec
|
|
32
|
+
Requires-Dist: msgspec<0.20,>=0.18
|
|
33
33
|
Requires-Dist: tenacity<10,>=8
|
|
34
34
|
|
|
35
35
|
# python-rucaptcha
|
|
@@ -45,6 +45,7 @@ Requires-Dist: tenacity<10,>=8
|
|
|
45
45
|
[](https://badge.fury.io/py/python-rucaptcha)
|
|
46
46
|
[](https://badge.fury.io/py/python-rucaptcha)
|
|
47
47
|
[](https://pepy.tech/project/python-rucaptcha)
|
|
48
|
+
[](https://andreidrang.github.io/python-rucaptcha/)
|
|
48
49
|
|
|
49
50
|
[](https://codeclimate.com/github/AndreiDrang/python-rucaptcha/maintainability)
|
|
50
51
|
[](https://www.codacy.com/gh/AndreiDrang/python-rucaptcha/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AndreiDrang/python-rucaptcha&utm_campaign=Badge_Grade)
|
|
@@ -56,21 +57,16 @@ Requires-Dist: tenacity<10,>=8
|
|
|
56
57
|
[](https://github.com/AndreiDrang/python-rucaptcha/actions/workflows/test.yml)
|
|
57
58
|
[](https://github.com/AndreiDrang/python-rucaptcha/actions/workflows/lint.yml)
|
|
58
59
|
|
|
59
|
-
Python3 library for [RuCaptcha](https://rucaptcha.com
|
|
60
|
+
Python3 library for [RuCaptcha](https://rucaptcha.com/?from=4170435) and [2Captcha](https://2captcha.com/?from=4170435) service API.
|
|
60
61
|
|
|
61
62
|
Tested on UNIX based OS.
|
|
62
63
|
|
|
63
|
-
The library is intended for software developers and is used to work with the [RuCaptcha](https://rucaptcha.com
|
|
64
|
+
The library is intended for software developers and is used to work with the [RuCaptcha](https://rucaptcha.com/?from=4170435) and [2Captcha](https://2captcha.com/?from=4170435) service API.
|
|
64
65
|
|
|
65
66
|
Support of the service [Death By Captcha](https://deathbycaptcha.com?refid=1237267242) is integrated into this library, more information in the library documentation or in the [service docs](https://deathbycaptcha.com/api/2captcha?refid=1237267242).
|
|
66
|
-
***
|
|
67
67
|
|
|
68
68
|
Application in [RuCaptcha software](https://rucaptcha.com/software/python-rucaptcha) and [2Captcha software](https://2captcha.com/software/python-rucaptcha).
|
|
69
69
|
|
|
70
|
-
If you have any questions, please send a message to the [Telegram](https://t.me/pythoncaptcha) chat room.
|
|
71
|
-
|
|
72
|
-
Or email python-captcha@pm.me
|
|
73
|
-
|
|
74
70
|
## How to install?
|
|
75
71
|
|
|
76
72
|
### pip
|
|
@@ -104,3 +100,9 @@ For full changelog info check - [Releases page](https://github.com/AndreiDrang/p
|
|
|
104
100
|
### Get API Key to work with the library
|
|
105
101
|
1. On the page - https://rucaptcha.com/enterpage
|
|
106
102
|
2. Find it: [](https://vyjava.xyz/dashboard/image/ac679557-f3cc-402f-bf95-6c45d252a2ef)
|
|
103
|
+
|
|
104
|
+
### Contacts
|
|
105
|
+
|
|
106
|
+
If you have any questions, please send a message to the [Telegram](https://t.me/pythoncaptcha) chat room.
|
|
107
|
+
|
|
108
|
+
Or email python-captcha@pm.me
|
|
@@ -1,11 +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=OKZjcwD69U3MrIvrJgcMdYy2P_EAc5PTibD6foeyE_E,22
|
|
3
3
|
python_rucaptcha/amazon_waf.py,sha256=psEg-sym8xQlMPPto1ND_HE0vGV_SRRrDnsKuEbbxNA,3625
|
|
4
|
-
python_rucaptcha/atb_captcha.py,sha256=
|
|
4
|
+
python_rucaptcha/atb_captcha.py,sha256=FuGG9MKTy7f_Sku7WQLZ7TCZ1ISFnu_0h4I3_Qri8JQ,3724
|
|
5
5
|
python_rucaptcha/audio_captcha.py,sha256=Bp6-gF3cTnYL8aeY8k4D4Ii7zPqy1Qo2OFRooSEd0MQ,5600
|
|
6
6
|
python_rucaptcha/bounding_box_captcha.py,sha256=JvJEU1Y0A1SVkJV9jEFgBQ7Nis-vFkTmfUBoHIeTinY,10648
|
|
7
7
|
python_rucaptcha/capy_puzzle.py,sha256=ITr1HNALlaKtBkrBht2QtEtP-u6K4-JXpDKKwih7RhA,4973
|
|
8
|
-
python_rucaptcha/control.py,sha256=
|
|
8
|
+
python_rucaptcha/control.py,sha256=1KnPaUOVEU7DY6x9-CJvuyV8nFapBcxGRfE9y3dprTo,4993
|
|
9
9
|
python_rucaptcha/coordinates_captcha.py,sha256=lmotaD_dOzo2T9MdcaOgQdB5opL-Hs-ZVUW5nTy-KJ0,9911
|
|
10
10
|
python_rucaptcha/cutcaptcha.py,sha256=glhvQe8Q35ap7J5dyD7hcXkcswG27fkJpYsvyIoTTRg,4050
|
|
11
11
|
python_rucaptcha/cyber_siara_captcha.py,sha256=P8oLkn3UZDuy3XjEyd59cK2QOHYesV6KQ5pMbw2deiA,3909
|
|
@@ -20,19 +20,20 @@ python_rucaptcha/image_captcha.py,sha256=jWTO-kLSKXG12koO2X9dsFXCr3OjvXgj2aNJyhS
|
|
|
20
20
|
python_rucaptcha/key_captcha.py,sha256=hufzqYEb3ZR23AsLWIL82HFTJnA8JsOJtXUA92b9tws,4017
|
|
21
21
|
python_rucaptcha/lemin_captcha.py,sha256=inEq-UWUbMX9aZdpyZBGRER-67YCS3PqxnDIpPAzmqM,4086
|
|
22
22
|
python_rucaptcha/mt_captcha.py,sha256=usQK_LR9piDQM7lxkZbSKi6KIXedIBYyytKJBJe8jNg,3415
|
|
23
|
+
python_rucaptcha/prosopo.py,sha256=kZLn_iZsm1mzQ8pNuPAzbfNfH8UBnLg1iy996Ti3nMo,3516
|
|
23
24
|
python_rucaptcha/re_captcha.py,sha256=XyJncVbmaV5jZR-qxZ1JdFum10W5yk5zeVrDbZ5dSKo,6083
|
|
24
25
|
python_rucaptcha/rotate_captcha.py,sha256=o9y9SVLPI6G6NqK1siv3xbOSYm7PGNquJbbhXuxTIDE,6278
|
|
25
|
-
python_rucaptcha/tencent.py,sha256=
|
|
26
|
+
python_rucaptcha/tencent.py,sha256=f7lnRBUl-X5rL2FNRnrlh9ITRCcerTaS6XGUXnQdnOA,3649
|
|
26
27
|
python_rucaptcha/text_captcha.py,sha256=lZDPwTgpMLvqvfjPbT-uNuNu6JRdWTEE9qfjnRQ5y-A,3708
|
|
27
28
|
python_rucaptcha/turnstile.py,sha256=VpmYGYJoRVX6NHipO6-g2U5EpwxZToAZRmULj4ReDD0,3686
|
|
28
29
|
python_rucaptcha/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
30
|
python_rucaptcha/core/base.py,sha256=MvP0zQspHUmAgI8mZle_sYhs7H0ynUKwdhz5PwaIx4c,9425
|
|
30
31
|
python_rucaptcha/core/config.py,sha256=UHP9iAaW3VpVC_7eHz_ihkYWIMAA9t_UXERfs5LwKiM,553
|
|
31
|
-
python_rucaptcha/core/enums.py,sha256=
|
|
32
|
+
python_rucaptcha/core/enums.py,sha256=t_7jYpRgTxnAgNx_S0LIBUUmTXBHCqnXxVJ6NhnfAOk,3913
|
|
32
33
|
python_rucaptcha/core/result_handler.py,sha256=LJskNbfgsOdxwzXoNknzVPzCnxBrSR6EwsvOJgs0aD8,2724
|
|
33
34
|
python_rucaptcha/core/serializer.py,sha256=asJRFD14uwOXG8gaNqsfaukiPBbsxt4r0rDA7lCuNHk,1739
|
|
34
|
-
python_rucaptcha-6.3.
|
|
35
|
-
python_rucaptcha-6.3.
|
|
36
|
-
python_rucaptcha-6.3.
|
|
37
|
-
python_rucaptcha-6.3.
|
|
38
|
-
python_rucaptcha-6.3.
|
|
35
|
+
python_rucaptcha-6.3.2.dist-info/LICENSE,sha256=N_utAsqhTp1pXXp-PTE-CFMg5BfIIqTbF-phwwzOHeQ,1063
|
|
36
|
+
python_rucaptcha-6.3.2.dist-info/METADATA,sha256=fnY8wPnogkl-HHdUdAn580hiMq8yEyBWSqJBDXvtJ1k,6674
|
|
37
|
+
python_rucaptcha-6.3.2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
38
|
+
python_rucaptcha-6.3.2.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
|
|
39
|
+
python_rucaptcha-6.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|