python-rucaptcha 6.1.2__tar.gz → 6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. python_rucaptcha-6.2/LICENSE +21 -0
  2. python_rucaptcha-6.2/MANIFEST.in +1 -0
  3. {python-rucaptcha-6.1.2/python_rucaptcha.egg-info → python_rucaptcha-6.2}/PKG-INFO +21 -43
  4. python-rucaptcha-6.1.2/PKG-INFO → python_rucaptcha-6.2/README.md +8 -64
  5. python_rucaptcha-6.2/pyproject.toml +109 -0
  6. python_rucaptcha-6.2/src/python_rucaptcha/__init__.py +1 -0
  7. python_rucaptcha-6.2/src/python_rucaptcha/__version__.py +1 -0
  8. python_rucaptcha-6.2/src/python_rucaptcha/atb_captcha.py +110 -0
  9. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/control.py +3 -0
  10. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/core/enums.py +10 -0
  11. python_rucaptcha-6.2/src/python_rucaptcha/tencent.py +112 -0
  12. python_rucaptcha-6.2/src/python_rucaptcha.egg-info/PKG-INFO +117 -0
  13. python_rucaptcha-6.2/src/python_rucaptcha.egg-info/SOURCES.txt +67 -0
  14. python_rucaptcha-6.2/src/python_rucaptcha.egg-info/requires.txt +4 -0
  15. python_rucaptcha-6.2/tests/test_amazon.py +96 -0
  16. python_rucaptcha-6.2/tests/test_audio.py +195 -0
  17. python_rucaptcha-6.2/tests/test_bounding_box.py +157 -0
  18. python_rucaptcha-6.2/tests/test_capypuzzle.py +115 -0
  19. python_rucaptcha-6.2/tests/test_control.py +91 -0
  20. python_rucaptcha-6.2/tests/test_coordinates.py +157 -0
  21. python_rucaptcha-6.2/tests/test_core.py +115 -0
  22. python_rucaptcha-6.2/tests/test_cutcaptcha.py +156 -0
  23. python_rucaptcha-6.2/tests/test_cybersiara.py +91 -0
  24. python_rucaptcha-6.2/tests/test_datadome.py +122 -0
  25. python_rucaptcha-6.2/tests/test_draw_around.py +157 -0
  26. python_rucaptcha-6.2/tests/test_friendly_captcha.py +131 -0
  27. python_rucaptcha-6.2/tests/test_funcaptcha.py +126 -0
  28. python_rucaptcha-6.2/tests/test_geetest.py +242 -0
  29. python_rucaptcha-6.2/tests/test_grid.py +159 -0
  30. python_rucaptcha-6.2/tests/test_hcaptcha.py +123 -0
  31. python_rucaptcha-6.2/tests/test_image.py +188 -0
  32. python_rucaptcha-6.2/tests/test_key_captcha.py +179 -0
  33. python_rucaptcha-6.2/tests/test_lemin.py +143 -0
  34. python_rucaptcha-6.2/tests/test_mtcaptcha.py +67 -0
  35. python_rucaptcha-6.2/tests/test_recaptcha.py +124 -0
  36. python_rucaptcha-6.2/tests/test_rotate.py +219 -0
  37. python_rucaptcha-6.2/tests/test_tencent.py +71 -0
  38. python_rucaptcha-6.2/tests/test_text.py +69 -0
  39. python_rucaptcha-6.2/tests/test_turnstile.py +130 -0
  40. python-rucaptcha-6.1.2/python_rucaptcha/__version__.py +0 -1
  41. python-rucaptcha-6.1.2/python_rucaptcha/core/__init__.py +0 -0
  42. python-rucaptcha-6.1.2/python_rucaptcha.egg-info/SOURCES.txt +0 -38
  43. python-rucaptcha-6.1.2/python_rucaptcha.egg-info/not-zip-safe +0 -1
  44. python-rucaptcha-6.1.2/python_rucaptcha.egg-info/requires.txt +0 -4
  45. python-rucaptcha-6.1.2/setup.py +0 -143
  46. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2}/setup.cfg +0 -0
  47. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/amazon_waf.py +0 -0
  48. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/audio_captcha.py +0 -0
  49. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/bounding_box_captcha.py +0 -0
  50. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/capy_puzzle.py +0 -0
  51. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/coordinates_captcha.py +0 -0
  52. {python-rucaptcha-6.1.2/python_rucaptcha → python_rucaptcha-6.2/src/python_rucaptcha/core}/__init__.py +0 -0
  53. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/core/base.py +0 -0
  54. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/core/config.py +0 -0
  55. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/core/result_handler.py +0 -0
  56. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/core/serializer.py +0 -0
  57. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/cutcaptcha.py +0 -0
  58. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/cyber_siara_captcha.py +0 -0
  59. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/datadome_captcha.py +0 -0
  60. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/draw_around_captcha.py +0 -0
  61. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/friendly_captcha.py +0 -0
  62. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/fun_captcha.py +0 -0
  63. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/gee_test.py +0 -0
  64. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/grid_captcha.py +0 -0
  65. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/hcaptcha.py +0 -0
  66. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/image_captcha.py +0 -0
  67. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/key_captcha.py +0 -0
  68. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/lemin_captcha.py +0 -0
  69. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/mt_captcha.py +0 -0
  70. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/re_captcha.py +0 -0
  71. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/rotate_captcha.py +0 -0
  72. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/text_captcha.py +0 -0
  73. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha/turnstile.py +0 -0
  74. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha.egg-info/dependency_links.txt +0 -0
  75. {python-rucaptcha-6.1.2 → python_rucaptcha-6.2/src}/python_rucaptcha.egg-info/top_level.txt +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Andrei
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ include README.md LICENSE
@@ -1,42 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-rucaptcha
3
- Version: 6.1.2
3
+ Version: 6.2
4
4
  Summary: Python 3.9+ RuCaptcha library with AIO module.
5
- Home-page: https://andreidrang.github.io/python-rucaptcha/
6
- Author: AndreiDrang, redV0ID
7
- Author-email: python-captcha@pm.me
8
- License: MIT
5
+ Author-email: AndreiDrang <python-captcha@pm.me>
6
+ License: MIT License
7
+ Project-URL: Homepage, https://andreidrang.github.io/python-rucaptcha/
9
8
  Project-URL: Documentation, https://andreidrang.github.io/python-rucaptcha/
10
- Project-URL: Source, https://github.com/AndreiDrang/python-rucaptcha
9
+ Project-URL: Repository, https://github.com/AndreiDrang/python-rucaptcha
10
+ Project-URL: Issues, https://github.com/AndreiDrang/python-rucaptcha/issues
11
11
  Project-URL: Changelog, https://github.com/AndreiDrang/python-rucaptcha/releases
12
- Project-URL: Issue tracker, https://github.com/AndreiDrang/python-rucaptcha/issues
13
- Keywords: captcha
14
- rucaptcha
15
- 2captcha
16
- deathbycaptcha
17
- recaptcha
18
- geetest
19
- hcaptcha
20
- capypuzzle
21
- tiktok
22
- rotatecaptcha
23
- funcaptcha
24
- keycaptcha
25
- python3
26
- recaptcha
27
- captcha
28
- security
29
- tiktok
30
- python-library
31
- python-rucaptcha
32
- rucaptcha-client
33
- yandex
34
- turnstile
35
- amazon
36
- amazon_waf
37
- friendly-captcha
12
+ Keywords: captcha,rucaptcha,2captcha,deathbycaptcha,recaptcha,geetest,hcaptcha,capypuzzle,tiktok,rotatecaptcha,funcaptcha,keycaptcha,python3,recaptcha,captcha,security,tiktok,tencent,atb_captcha,python-library,python-rucaptcha,rucaptcha-client,yandex,turnstile,amazon,amazon_waf,friendly-captcha
38
13
  Classifier: License :: OSI Approved :: MIT License
39
14
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
15
+ Classifier: Development Status :: 5 - Production/Stable
40
16
  Classifier: Programming Language :: Python
41
17
  Classifier: Programming Language :: Python :: 3
42
18
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -44,28 +20,30 @@ Classifier: Programming Language :: Python :: 3.9
44
20
  Classifier: Programming Language :: Python :: 3.10
45
21
  Classifier: Programming Language :: Python :: 3.11
46
22
  Classifier: Programming Language :: Python :: 3.12
47
- Classifier: Development Status :: 5 - Production/Stable
48
23
  Classifier: Framework :: AsyncIO
49
24
  Classifier: Operating System :: Unix
50
25
  Classifier: Operating System :: Microsoft :: Windows
51
26
  Classifier: Operating System :: MacOS
52
- Requires-Python: >=3.9.0
27
+ Requires-Python: >=3.9
53
28
  Description-Content-Type: text/markdown
54
- Requires-Dist: requests>=2.28.0
55
- Requires-Dist: aiohttp>=3.9.0
29
+ License-File: LICENSE
30
+ Requires-Dist: requests>=2.21.0
31
+ Requires-Dist: aiohttp>=3.9.2
56
32
  Requires-Dist: msgspec==0.18.*
57
- Requires-Dist: tenacity==8.2.*
58
-
33
+ Requires-Dist: tenacity==8.*
59
34
 
60
35
  # python-rucaptcha
61
36
 
62
37
  ![Logo](https://red-panda-dev.xyz/media/images/RuCaptchaHigh_zkkPoYF.original.png)
63
38
 
64
- <a href="https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1">
65
- <img src="https://cdn.discordapp.com/attachments/1105172394655625306/1105180101802471575/20221207-160749.gif" alt="Capsolver's Banner">
66
- </a>
67
- <br>
68
- At the lowest price on the market, you may receive a variety of solutions, including reCAPTCHA V2, reCAPTCHA V3, hCaptcha, hCaptcha Click, FunCaptcha, picture-to-text, and more. With this service, 0.1s is the slowest speed ever measured.
39
+ ### [Capsolver](https://capsolver.com?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha)
40
+
41
+ [![Capsolver](files/capsolver.jpg)](https://capsolver.com?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha)
42
+
43
+ [Capsolver.com](https://www.capsolver.com/?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha) is an AI-powered service that specializes in solving various types of captchas automatically. It supports captchas such as [reCAPTCHA V2](https://docs.capsolver.com/guide/captcha/ReCaptchaV2.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [reCAPTCHA V3](https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [hCaptcha](https://docs.capsolver.com/guide/captcha/HCaptcha.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [FunCaptcha](https://docs.capsolver.com/guide/captcha/FunCaptcha.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [DataDome](https://docs.capsolver.com/guide/captcha/DataDome.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [AWS Captcha](https://docs.capsolver.com/guide/captcha/awsWaf.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [Geetest](https://docs.capsolver.com/guide/captcha/Geetest.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), and Cloudflare [Captcha](https://docs.capsolver.com/guide/antibots/cloudflare_turnstile.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha) / [Challenge 5s](https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [Imperva / Incapsula](https://docs.capsolver.com/guide/antibots/imperva.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), among others.
44
+
45
+ For developers, Capsolver offers API integration options detailed in their [documentation](https://docs.capsolver.com/?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), facilitating the integration of captcha solving into applications. They also provide browser extensions for [Chrome](https://chromewebstore.google.com/detail/captcha-solver-auto-captc/pgojnojmmhpofjgdmaebadhbocahppod) and [Firefox](https://addons.mozilla.org/es/firefox/addon/capsolver-captcha-solver/), making it easy to use their service directly within a browser. Different pricing packages are available to accommodate varying needs, ensuring flexibility for users.
46
+
69
47
  <hr>
70
48
 
71
49
  [![PyPI version](https://badge.fury.io/py/python-rucaptcha.svg)](https://badge.fury.io/py/python-rucaptcha)
@@ -1,71 +1,15 @@
1
- Metadata-Version: 2.1
2
- Name: python-rucaptcha
3
- Version: 6.1.2
4
- Summary: Python 3.9+ RuCaptcha library with AIO module.
5
- Home-page: https://andreidrang.github.io/python-rucaptcha/
6
- Author: AndreiDrang, redV0ID
7
- Author-email: python-captcha@pm.me
8
- License: MIT
9
- Project-URL: Documentation, https://andreidrang.github.io/python-rucaptcha/
10
- Project-URL: Source, https://github.com/AndreiDrang/python-rucaptcha
11
- Project-URL: Changelog, https://github.com/AndreiDrang/python-rucaptcha/releases
12
- Project-URL: Issue tracker, https://github.com/AndreiDrang/python-rucaptcha/issues
13
- Keywords: captcha
14
- rucaptcha
15
- 2captcha
16
- deathbycaptcha
17
- recaptcha
18
- geetest
19
- hcaptcha
20
- capypuzzle
21
- tiktok
22
- rotatecaptcha
23
- funcaptcha
24
- keycaptcha
25
- python3
26
- recaptcha
27
- captcha
28
- security
29
- tiktok
30
- python-library
31
- python-rucaptcha
32
- rucaptcha-client
33
- yandex
34
- turnstile
35
- amazon
36
- amazon_waf
37
- friendly-captcha
38
- Classifier: License :: OSI Approved :: MIT License
39
- Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
40
- Classifier: Programming Language :: Python
41
- Classifier: Programming Language :: Python :: 3
42
- Classifier: Programming Language :: Python :: 3 :: Only
43
- Classifier: Programming Language :: Python :: 3.9
44
- Classifier: Programming Language :: Python :: 3.10
45
- Classifier: Programming Language :: Python :: 3.11
46
- Classifier: Programming Language :: Python :: 3.12
47
- Classifier: Development Status :: 5 - Production/Stable
48
- Classifier: Framework :: AsyncIO
49
- Classifier: Operating System :: Unix
50
- Classifier: Operating System :: Microsoft :: Windows
51
- Classifier: Operating System :: MacOS
52
- Requires-Python: >=3.9.0
53
- Description-Content-Type: text/markdown
54
- Requires-Dist: requests>=2.28.0
55
- Requires-Dist: aiohttp>=3.9.0
56
- Requires-Dist: msgspec==0.18.*
57
- Requires-Dist: tenacity==8.2.*
58
-
59
-
60
1
  # python-rucaptcha
61
2
 
62
3
  ![Logo](https://red-panda-dev.xyz/media/images/RuCaptchaHigh_zkkPoYF.original.png)
63
4
 
64
- <a href="https://dashboard.capsolver.com/passport/register?inviteCode=kQTn-tG07Jb1">
65
- <img src="https://cdn.discordapp.com/attachments/1105172394655625306/1105180101802471575/20221207-160749.gif" alt="Capsolver's Banner">
66
- </a>
67
- <br>
68
- At the lowest price on the market, you may receive a variety of solutions, including reCAPTCHA V2, reCAPTCHA V3, hCaptcha, hCaptcha Click, FunCaptcha, picture-to-text, and more. With this service, 0.1s is the slowest speed ever measured.
5
+ ### [Capsolver](https://capsolver.com?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha)
6
+
7
+ [![Capsolver](files/capsolver.jpg)](https://capsolver.com?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha)
8
+
9
+ [Capsolver.com](https://www.capsolver.com/?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha) is an AI-powered service that specializes in solving various types of captchas automatically. It supports captchas such as [reCAPTCHA V2](https://docs.capsolver.com/guide/captcha/ReCaptchaV2.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [reCAPTCHA V3](https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [hCaptcha](https://docs.capsolver.com/guide/captcha/HCaptcha.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [FunCaptcha](https://docs.capsolver.com/guide/captcha/FunCaptcha.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [DataDome](https://docs.capsolver.com/guide/captcha/DataDome.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [AWS Captcha](https://docs.capsolver.com/guide/captcha/awsWaf.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [Geetest](https://docs.capsolver.com/guide/captcha/Geetest.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), and Cloudflare [Captcha](https://docs.capsolver.com/guide/antibots/cloudflare_turnstile.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha) / [Challenge 5s](https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), [Imperva / Incapsula](https://docs.capsolver.com/guide/antibots/imperva.html?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), among others.
10
+
11
+ For developers, Capsolver offers API integration options detailed in their [documentation](https://docs.capsolver.com/?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha), facilitating the integration of captcha solving into applications. They also provide browser extensions for [Chrome](https://chromewebstore.google.com/detail/captcha-solver-auto-captc/pgojnojmmhpofjgdmaebadhbocahppod) and [Firefox](https://addons.mozilla.org/es/firefox/addon/capsolver-captcha-solver/), making it easy to use their service directly within a browser. Different pricing packages are available to accommodate varying needs, ensuring flexibility for users.
12
+
69
13
  <hr>
70
14
 
71
15
  [![PyPI version](https://badge.fury.io/py/python-rucaptcha.svg)](https://badge.fury.io/py/python-rucaptcha)
@@ -0,0 +1,109 @@
1
+ [tool.black]
2
+ line-length = 120
3
+ target-version = ['py311']
4
+ exclude = '''
5
+ /(
6
+ \.git
7
+ | \.hg
8
+ | \.mypy_cache
9
+ | \.tox
10
+ | \.venv
11
+ | _build
12
+ | buck-out
13
+ | build
14
+ | dist
15
+ )/
16
+ '''
17
+
18
+ [tool.isort]
19
+ profile = "black"
20
+ skip_glob = "examples/**"
21
+ line_length = 120
22
+ length_sort = true
23
+
24
+ [tool.pytest.ini_options]
25
+ minversion = "7.0"
26
+ asyncio_mode = "auto"
27
+ testpaths = [
28
+ "tests",
29
+ ]
30
+ addopts = "-vv --tb=short --durations=10"
31
+
32
+ [build-system]
33
+ requires = ["setuptools"]
34
+ build-backend = "setuptools.build_meta"
35
+
36
+ [project]
37
+ name = "python-rucaptcha"
38
+ dynamic = ["version"]
39
+ authors = [
40
+ {name = "AndreiDrang", email = "python-captcha@pm.me"},
41
+ ]
42
+ description = "Python 3.9+ RuCaptcha library with AIO module."
43
+ readme = "README.md"
44
+ requires-python = ">=3.9"
45
+ keywords = [ "captcha",
46
+ "rucaptcha",
47
+ "2captcha",
48
+ "deathbycaptcha",
49
+ "recaptcha",
50
+ "geetest",
51
+ "hcaptcha",
52
+ "capypuzzle",
53
+ "tiktok",
54
+ "rotatecaptcha",
55
+ "funcaptcha",
56
+ "keycaptcha",
57
+ "python3",
58
+ "recaptcha",
59
+ "captcha",
60
+ "security",
61
+ "tiktok",
62
+ "tencent",
63
+ "atb_captcha",
64
+ "python-library",
65
+ "python-rucaptcha",
66
+ "rucaptcha-client",
67
+ "yandex",
68
+ "turnstile",
69
+ "amazon",
70
+ "amazon_waf",
71
+ "friendly-captcha"
72
+ ]
73
+ license = {text = "MIT License"}
74
+ classifiers = [
75
+ "License :: OSI Approved :: MIT License",
76
+ "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
77
+ "Development Status :: 5 - Production/Stable",
78
+ "Programming Language :: Python",
79
+ "Programming Language :: Python :: 3",
80
+ "Programming Language :: Python :: 3 :: Only",
81
+ "Programming Language :: Python :: 3.9",
82
+ "Programming Language :: Python :: 3.10",
83
+ "Programming Language :: Python :: 3.11",
84
+ "Programming Language :: Python :: 3.12",
85
+ "Framework :: AsyncIO",
86
+ "Operating System :: Unix",
87
+ "Operating System :: Microsoft :: Windows",
88
+ "Operating System :: MacOS",
89
+ ]
90
+ dependencies = [
91
+ "requests>=2.21.0",
92
+ "aiohttp>=3.9.2",
93
+ "msgspec==0.18.*",
94
+ "tenacity==8.*"
95
+ ]
96
+
97
+ [tool.setuptools.packages.find]
98
+ where = ["src"]
99
+ include = ["python_rucaptcha*"]
100
+
101
+ [tool.setuptools.dynamic]
102
+ version = {attr = "python_rucaptcha.__version__"}
103
+
104
+ [project.urls]
105
+ Homepage = "https://andreidrang.github.io/python-rucaptcha/"
106
+ Documentation = "https://andreidrang.github.io/python-rucaptcha/"
107
+ Repository = "https://github.com/AndreiDrang/python-rucaptcha"
108
+ Issues = "https://github.com/AndreiDrang/python-rucaptcha/issues"
109
+ Changelog = "https://github.com/AndreiDrang/python-rucaptcha/releases"
@@ -0,0 +1 @@
1
+ from python_rucaptcha.__version__ import __version__ # noqa
@@ -0,0 +1 @@
1
+ __version__ = "6.2"
@@ -0,0 +1,110 @@
1
+ from typing import Union
2
+
3
+ from .core.base import BaseCaptcha
4
+ from .core.enums import atbCaptchaEnm
5
+
6
+
7
+ class atbCaptcha(BaseCaptcha):
8
+ def __init__(
9
+ self,
10
+ websiteURL: str,
11
+ appId: str,
12
+ apiServer: str,
13
+ method: Union[str, atbCaptchaEnm] = atbCaptchaEnm.AtbCaptchaTaskProxyless,
14
+ *args,
15
+ **kwargs,
16
+ ):
17
+ """
18
+ The class is used to work with CapyPuzzle.
19
+
20
+ Args:
21
+ rucaptcha_key: User API key
22
+ websiteURL: The full URL of target web page where the captcha is loaded.
23
+ We do not open the page, not a problem if it is available only for authenticated users
24
+ appId: The value of `appId` parameter in the website source code.
25
+ apiServer: The value of `apiServer` parameter in the website source code.
26
+ method: Captcha type
27
+
28
+ Examples:
29
+ >>> atbCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
30
+ ... websiteURL="https://www.tencentcloud.com/account/register",
31
+ ... appId="2009899766",
32
+ ... apiServer="https://cap.aisecurius.com",
33
+ ... method=atbCaptchaEnm.AtbCaptchaTaskProxyless.value,
34
+ ... ).captcha_handler()
35
+ {
36
+ "errorId":0,
37
+ "status":"ready",
38
+ "solution":{
39
+ "token": "sl191suxzluwxxh6f:"
40
+ },
41
+ "cost":"0.00299",
42
+ "ip":"1.2.3.4",
43
+ "createTime":1692863536,
44
+ "endTime":1692863556,
45
+ "solveCount":1,
46
+ "taskId":75190409731
47
+ }
48
+
49
+ >>> await atbCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
50
+ ... websiteURL="https://www.tencentcloud.com/account/register",
51
+ ... appId="2009899766",
52
+ ... apiServer="https://cap.aisecurius.com",
53
+ ... method=atbCaptchaEnm.AtbCaptchaTaskProxyless.value,
54
+ ... ).aio_captcha_handler()
55
+ {
56
+ "errorId":0,
57
+ "status":"ready",
58
+ "solution":{
59
+ "token": "sl191suxzluwxxh6f:"
60
+ },
61
+ "cost":"0.00299",
62
+ "ip":"1.2.3.4",
63
+ "createTime":1692863536,
64
+ "endTime":1692863556,
65
+ "solveCount":1,
66
+ "taskId":75190409731
67
+ }
68
+
69
+ Returns:
70
+ Dict with full server response
71
+
72
+ Notes:
73
+ https://rucaptcha.com/api-docs/atb-captcha
74
+ https://2captcha.com/api-docs/atb-captcha
75
+ """
76
+ super().__init__(method=method, *args, **kwargs)
77
+
78
+ self.create_task_payload["task"].update({"websiteURL": websiteURL, "appId": appId, "apiServer": apiServer})
79
+
80
+ # check user params
81
+ if method not in atbCaptchaEnm.list_values():
82
+ raise ValueError(f"Invalid method parameter set, available - {atbCaptchaEnm.list_values()}")
83
+
84
+ def captcha_handler(self, **kwargs) -> dict:
85
+ """
86
+ Sync solving method
87
+
88
+ Args:
89
+ kwargs: additional params for `requests` library
90
+
91
+ Returns:
92
+ Dict with full server response
93
+
94
+ Notes:
95
+ Check class docstirng for more info
96
+ """
97
+
98
+ return self._processing_response(**kwargs)
99
+
100
+ async def aio_captcha_handler(self) -> dict:
101
+ """
102
+ Async solving method
103
+
104
+ Returns:
105
+ Dict with full server response
106
+
107
+ Notes:
108
+ Check class docstirng for more info
109
+ """
110
+ return await self._aio_processing_response()
@@ -57,6 +57,9 @@ class Control(BaseCaptcha):
57
57
  https://rucaptcha.com/api-docs/get-balance
58
58
  https://rucaptcha.com/api-docs/report-correct
59
59
  https://rucaptcha.com/api-docs/report-incorrect
60
+ https://2captcha.com/api-docs/get-balance
61
+ https://2captcha.com/api-docs/report-correct
62
+ https://2captcha.com/api-docs/report-incorrect
60
63
  """
61
64
 
62
65
  super().__init__(method=ControlEnm.control, *args, **kwargs)
@@ -149,3 +149,13 @@ class GridCaptchaEnm(str, MyEnum):
149
149
  class FriendlyCaptchaEnm(str, MyEnum):
150
150
  FriendlyCaptchaTaskProxyless = "FriendlyCaptchaTaskProxyless"
151
151
  FriendlyCaptchaTask = "FriendlyCaptchaTask"
152
+
153
+
154
+ class TencentEnm(str, MyEnum):
155
+ TencentTask = "TencentTask"
156
+ TencentTaskProxyless = "TencentTaskProxyless"
157
+
158
+
159
+ class atbCaptchaEnm(str, MyEnum):
160
+ AtbCaptchaTask = "AtbCaptchaTask"
161
+ AtbCaptchaTaskProxyless = "AtbCaptchaTaskProxyless"
@@ -0,0 +1,112 @@
1
+ from typing import Union
2
+
3
+ from .core.base import BaseCaptcha
4
+ from .core.enums import TencentEnm
5
+
6
+
7
+ class Tencent(BaseCaptcha):
8
+ def __init__(
9
+ self,
10
+ websiteURL: str,
11
+ appId: str,
12
+ method: Union[str, TencentEnm] = TencentEnm.TencentTaskProxyless,
13
+ *args,
14
+ **kwargs,
15
+ ):
16
+ """
17
+ The class is used to work with CapyPuzzle.
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 only for authenticated users
23
+ appId: The value of `appId` parameter in the website source code.
24
+ method: Captcha type
25
+
26
+ Examples:
27
+ >>> Tencent(rucaptcha_key="aa9011f31111181111168611f1151122",
28
+ ... websiteURL="https://www.tencentcloud.com/account/register",
29
+ ... appId="2009899766",
30
+ ... method=TencentEnm.TencentTaskProxyless.value,
31
+ ... ).captcha_handler()
32
+ {
33
+ "errorId":0,
34
+ "status":"ready",
35
+ "solution":{
36
+ "appid": "190014885",
37
+ "ret": 0,
38
+ "ticket": "tr034XXXXXXXXXXXXXXXXXX*",
39
+ "randstr": "@KVN"
40
+ },
41
+ "cost":"0.00299",
42
+ "ip":"1.2.3.4",
43
+ "createTime":1692863536,
44
+ "endTime":1692863556,
45
+ "solveCount":1,
46
+ "taskId":75190409731
47
+ }
48
+
49
+ >>> await Tencent(rucaptcha_key="aa9011f31111181111168611f1151122",
50
+ ... websiteURL="https://www.tencentcloud.com/account/register",
51
+ ... appId="2009899766",
52
+ ... method=TencentEnm.TencentTaskProxyless.value,
53
+ ... ).aio_captcha_handler()
54
+ {
55
+ "errorId":0,
56
+ "status":"ready",
57
+ "solution":{
58
+ "appid": "190014885",
59
+ "ret": 0,
60
+ "ticket": "tr034XXXXXXXXXXXXXXXXXX*",
61
+ "randstr": "@KVN"
62
+ },
63
+ "cost":"0.00299",
64
+ "ip":"1.2.3.4",
65
+ "createTime":1692863536,
66
+ "endTime":1692863556,
67
+ "solveCount":1,
68
+ "taskId":75190409731
69
+ }
70
+
71
+ Returns:
72
+ Dict with full server response
73
+
74
+ Notes:
75
+ https://rucaptcha.com/api-docs/tencent
76
+ https://2captcha.com/api-docs/tencent
77
+ """
78
+ super().__init__(method=method, *args, **kwargs)
79
+
80
+ self.create_task_payload["task"].update({"websiteURL": websiteURL, "appId": appId})
81
+
82
+ # check user params
83
+ if method not in TencentEnm.list_values():
84
+ raise ValueError(f"Invalid method parameter set, available - {TencentEnm.list_values()}")
85
+
86
+ def captcha_handler(self, **kwargs) -> dict:
87
+ """
88
+ Sync solving method
89
+
90
+ Args:
91
+ kwargs: additional params for `requests` library
92
+
93
+ Returns:
94
+ Dict with full server response
95
+
96
+ Notes:
97
+ Check class docstirng for more info
98
+ """
99
+
100
+ return self._processing_response(**kwargs)
101
+
102
+ async def aio_captcha_handler(self) -> dict:
103
+ """
104
+ Async solving method
105
+
106
+ Returns:
107
+ Dict with full server response
108
+
109
+ Notes:
110
+ Check class docstirng for more info
111
+ """
112
+ return await self._aio_processing_response()