python-rucaptcha 6.3.2__tar.gz → 6.4.0__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 (72) hide show
  1. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/LICENSE +1 -1
  2. {python_rucaptcha-6.3.2/src/python_rucaptcha.egg-info → python_rucaptcha-6.4.0}/PKG-INFO +4 -5
  3. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/pyproject.toml +1 -3
  4. python_rucaptcha-6.4.0/src/python_rucaptcha/__version__.py +1 -0
  5. python_rucaptcha-6.4.0/src/python_rucaptcha/captcha_fox.py +124 -0
  6. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/enums.py +4 -0
  7. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/datadome_captcha.py +2 -2
  8. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0/src/python_rucaptcha.egg-info}/PKG-INFO +4 -5
  9. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha.egg-info/SOURCES.txt +1 -0
  10. python_rucaptcha-6.3.2/src/python_rucaptcha/__version__.py +0 -1
  11. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/MANIFEST.in +0 -0
  12. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/README.md +0 -0
  13. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/setup.cfg +0 -0
  14. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/__init__.py +0 -0
  15. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/amazon_waf.py +0 -0
  16. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/atb_captcha.py +0 -0
  17. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/audio_captcha.py +0 -0
  18. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/bounding_box_captcha.py +0 -0
  19. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/capy_puzzle.py +0 -0
  20. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/control.py +0 -0
  21. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/coordinates_captcha.py +0 -0
  22. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/__init__.py +0 -0
  23. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/base.py +0 -0
  24. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/config.py +0 -0
  25. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/result_handler.py +0 -0
  26. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/core/serializer.py +0 -0
  27. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/cutcaptcha.py +0 -0
  28. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/cyber_siara_captcha.py +0 -0
  29. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/draw_around_captcha.py +0 -0
  30. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/friendly_captcha.py +0 -0
  31. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/fun_captcha.py +0 -0
  32. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/gee_test.py +0 -0
  33. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/grid_captcha.py +0 -0
  34. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/hcaptcha.py +0 -0
  35. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/image_captcha.py +0 -0
  36. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/key_captcha.py +0 -0
  37. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/lemin_captcha.py +0 -0
  38. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/mt_captcha.py +0 -0
  39. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/prosopo.py +0 -0
  40. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/re_captcha.py +0 -0
  41. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/rotate_captcha.py +0 -0
  42. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/tencent.py +0 -0
  43. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/text_captcha.py +0 -0
  44. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha/turnstile.py +0 -0
  45. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha.egg-info/dependency_links.txt +0 -0
  46. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha.egg-info/requires.txt +0 -0
  47. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/src/python_rucaptcha.egg-info/top_level.txt +0 -0
  48. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_amazon.py +0 -0
  49. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_audio.py +0 -0
  50. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_bounding_box.py +0 -0
  51. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_capypuzzle.py +0 -0
  52. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_control.py +0 -0
  53. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_coordinates.py +0 -0
  54. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_core.py +0 -0
  55. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_cutcaptcha.py +0 -0
  56. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_cybersiara.py +0 -0
  57. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_datadome.py +0 -0
  58. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_draw_around.py +0 -0
  59. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_friendly_captcha.py +0 -0
  60. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_funcaptcha.py +0 -0
  61. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_geetest.py +0 -0
  62. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_grid.py +0 -0
  63. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_hcaptcha.py +0 -0
  64. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_image.py +0 -0
  65. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_key_captcha.py +0 -0
  66. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_lemin.py +0 -0
  67. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_mtcaptcha.py +0 -0
  68. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_recaptcha.py +0 -0
  69. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_rotate.py +0 -0
  70. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_tencent.py +0 -0
  71. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_text.py +0 -0
  72. {python_rucaptcha-6.3.2 → python_rucaptcha-6.4.0}/tests/test_turnstile.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Andrei
3
+ Copyright (c) 2025 Andrei
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,17 +1,15 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: python-rucaptcha
3
- Version: 6.3.2
3
+ Version: 6.4.0
4
4
  Summary: Python 3.9+ RuCaptcha library with AIO module.
5
5
  Author-email: AndreiDrang <python-captcha@pm.me>
6
- License: MIT License
6
+ License-Expression: MIT
7
7
  Project-URL: Homepage, https://andreidrang.github.io/python-rucaptcha/
8
8
  Project-URL: Documentation, https://andreidrang.github.io/python-rucaptcha/
9
9
  Project-URL: Repository, https://github.com/AndreiDrang/python-rucaptcha
10
10
  Project-URL: Issues, https://github.com/AndreiDrang/python-rucaptcha/issues
11
11
  Project-URL: Changelog, https://github.com/AndreiDrang/python-rucaptcha/releases
12
12
  Keywords: captcha,rucaptcha,2captcha,deathbycaptcha,recaptcha,geetest,hcaptcha,capypuzzle,rotatecaptcha,funcaptcha,keycaptcha,python3,recaptcha,captcha,security,tencent,atb_captcha,python-library,python-rucaptcha,rucaptcha-client,yandex,turnstile,amazon,amazon_waf,friendly-captcha
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
15
13
  Classifier: Development Status :: 5 - Production/Stable
16
14
  Classifier: Programming Language :: Python
17
15
  Classifier: Programming Language :: Python :: 3
@@ -31,6 +29,7 @@ Requires-Dist: requests>=2.21.0
31
29
  Requires-Dist: aiohttp>=3.9.2
32
30
  Requires-Dist: msgspec<0.20,>=0.18
33
31
  Requires-Dist: tenacity<10,>=8
32
+ Dynamic: license-file
34
33
 
35
34
  # python-rucaptcha
36
35
 
@@ -68,10 +68,8 @@ keywords = [ "captcha",
68
68
  "amazon_waf",
69
69
  "friendly-captcha"
70
70
  ]
71
- license = {text = "MIT License"}
71
+ license = "MIT"
72
72
  classifiers = [
73
- "License :: OSI Approved :: MIT License",
74
- "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
75
73
  "Development Status :: 5 - Production/Stable",
76
74
  "Programming Language :: Python",
77
75
  "Programming Language :: Python :: 3",
@@ -0,0 +1 @@
1
+ __version__ = "6.4.0"
@@ -0,0 +1,124 @@
1
+ from .core.base import BaseCaptcha
2
+ from .core.enums import CaptchaFoxEnm
3
+
4
+
5
+ class CaptchaFox(BaseCaptcha):
6
+ def __init__(
7
+ self,
8
+ websiteURL: str,
9
+ websiteKey: str,
10
+ userAgent: str,
11
+ proxyType: str,
12
+ proxyAddress: str,
13
+ proxyPort: str,
14
+ *args,
15
+ **kwargs,
16
+ ):
17
+ """
18
+ The class is used to work with CaptchaFox.
19
+
20
+ Args:
21
+ rucaptcha_key: User API key
22
+ websiteURL: Full URL of the captcha page
23
+ websiteKey: The value of the `key` parameter.
24
+ It can be found in the page source code or captured in network requests during page loading.
25
+ userAgent: User-Agent of your browser will be used to load the captcha.
26
+ Use only modern browser's User-Agents
27
+ proxyType: Proxy type - `http`, `socks4`, `socks5`
28
+ proxyAddress: Proxy IP address or hostname
29
+ proxyPort: Proxy port
30
+ method: Captcha type
31
+ kwargs: Not required params for task creation request
32
+
33
+ Examples:
34
+ >>> CaptchaFox(rucaptcha_key="aa9011f31111181111168611f1151122",
35
+ ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651",
36
+ ... websiteKey="sk_xtNxpk6fCdFbxh1_xJeGflSdCE9tn99G",
37
+ ... userAgent="Mozilla/5.0 .....",
38
+ ... proxyType="socks5",
39
+ ... proxyAddress="1.2.3.4",
40
+ ... proxyPort="445",
41
+ ... ).captcha_handler()
42
+ {
43
+ "errorId":0,
44
+ "status":"ready",
45
+ "solution":{
46
+ "token":"142000f.....er"
47
+ },
48
+ "cost":"0.002",
49
+ "ip":"1.2.3.4",
50
+ "createTime":1692863536,
51
+ "endTime":1692863556,
52
+ "solveCount":0,
53
+ "taskId": 73243152973,
54
+ }
55
+
56
+ >>> await CaptchaFox(rucaptcha_key="aa9011f31111181111168611f1151122",
57
+ ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651",
58
+ ... websiteKey="sk_xtNxpk6fCdFbxh1_xJeGflSdCE9tn99G",
59
+ ... userAgent="Mozilla/5.0 .....",
60
+ ... proxyType="socks5",
61
+ ... proxyAddress="1.2.3.4",
62
+ ... proxyPort="445",
63
+ ... ).aio_captcha_handler()
64
+ {
65
+ "errorId":0,
66
+ "status":"ready",
67
+ "solution":{
68
+ "token":"142000f.....er"
69
+ },
70
+ "cost":"0.002",
71
+ "ip":"1.2.3.4",
72
+ "createTime":1692863536,
73
+ "endTime":1692863556,
74
+ "solveCount":0,
75
+ "taskId": 73243152973,
76
+ }
77
+
78
+ Returns:
79
+ Dict with full server response
80
+
81
+ Notes:
82
+ https://2captcha.com/api-docs/captchafox
83
+
84
+ https://rucaptcha.com/api-docs/captchafox
85
+ """
86
+ super().__init__(method=CaptchaFoxEnm.CaptchaFoxTask, *args, **kwargs)
87
+
88
+ self.create_task_payload["task"].update(
89
+ {
90
+ "websiteURL": websiteURL,
91
+ "websiteKey": websiteKey,
92
+ "userAgent": userAgent,
93
+ "proxyType": proxyType,
94
+ "proxyAddress": proxyAddress,
95
+ "proxyPort": proxyPort,
96
+ }
97
+ )
98
+
99
+ def captcha_handler(self, **kwargs) -> dict:
100
+ """
101
+ Sync solving method
102
+
103
+ Args:
104
+ kwargs: additional params for `requests` library
105
+
106
+ Returns:
107
+ Dict with full server response
108
+
109
+ Notes:
110
+ Check class docstirng for more info
111
+ """
112
+ return self._processing_response(**kwargs)
113
+
114
+ async def aio_captcha_handler(self) -> dict:
115
+ """
116
+ Async solving method
117
+
118
+ Returns:
119
+ Dict with full server response
120
+
121
+ Notes:
122
+ Check class docstirng for more info
123
+ """
124
+ return await self._aio_processing_response()
@@ -164,3 +164,7 @@ class atbCaptchaEnm(str, MyEnum):
164
164
  class ProsopoEnm(str, MyEnum):
165
165
  ProsopoTask = "ProsopoTask"
166
166
  ProsopoTaskProxyless = "ProsopoTaskProxyless "
167
+
168
+
169
+ class CaptchaFoxEnm(str, MyEnum):
170
+ CaptchaFoxTask = "CaptchaFoxTask"
@@ -34,7 +34,7 @@ class DataDomeCaptcha(BaseCaptcha):
34
34
  >>> DataDomeCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
35
35
  ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651",
36
36
  ... captchaUrl="https://rucaptcha.com/demo/hcaptcha",
37
- ... userAgent="https://rucaptcha.com/demo/hcaptcha",
37
+ ... userAgent="Mozilla/5.0 .....",
38
38
  ... proxyType="socks5",
39
39
  ... proxyAddress="1.2.3.4",
40
40
  ... proxyPort="445",
@@ -56,7 +56,7 @@ class DataDomeCaptcha(BaseCaptcha):
56
56
  >>> await DataDomeCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
57
57
  ... websiteURL="3ceb8624-1970-4e6b-91d5-70317b70b651",
58
58
  ... captchaUrl="https://rucaptcha.com/demo/hcaptcha",
59
- ... userAgent="https://rucaptcha.com/demo/hcaptcha",
59
+ ... userAgent="Mozilla/5.0 .....",
60
60
  ... proxyType="socks5",
61
61
  ... proxyAddress="1.2.3.4",
62
62
  ... proxyPort="445",
@@ -1,17 +1,15 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: python-rucaptcha
3
- Version: 6.3.2
3
+ Version: 6.4.0
4
4
  Summary: Python 3.9+ RuCaptcha library with AIO module.
5
5
  Author-email: AndreiDrang <python-captcha@pm.me>
6
- License: MIT License
6
+ License-Expression: MIT
7
7
  Project-URL: Homepage, https://andreidrang.github.io/python-rucaptcha/
8
8
  Project-URL: Documentation, https://andreidrang.github.io/python-rucaptcha/
9
9
  Project-URL: Repository, https://github.com/AndreiDrang/python-rucaptcha
10
10
  Project-URL: Issues, https://github.com/AndreiDrang/python-rucaptcha/issues
11
11
  Project-URL: Changelog, https://github.com/AndreiDrang/python-rucaptcha/releases
12
12
  Keywords: captcha,rucaptcha,2captcha,deathbycaptcha,recaptcha,geetest,hcaptcha,capypuzzle,rotatecaptcha,funcaptcha,keycaptcha,python3,recaptcha,captcha,security,tencent,atb_captcha,python-library,python-rucaptcha,rucaptcha-client,yandex,turnstile,amazon,amazon_waf,friendly-captcha
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
15
13
  Classifier: Development Status :: 5 - Production/Stable
16
14
  Classifier: Programming Language :: Python
17
15
  Classifier: Programming Language :: Python :: 3
@@ -31,6 +29,7 @@ Requires-Dist: requests>=2.21.0
31
29
  Requires-Dist: aiohttp>=3.9.2
32
30
  Requires-Dist: msgspec<0.20,>=0.18
33
31
  Requires-Dist: tenacity<10,>=8
32
+ Dynamic: license-file
34
33
 
35
34
  # python-rucaptcha
36
35
 
@@ -8,6 +8,7 @@ src/python_rucaptcha/amazon_waf.py
8
8
  src/python_rucaptcha/atb_captcha.py
9
9
  src/python_rucaptcha/audio_captcha.py
10
10
  src/python_rucaptcha/bounding_box_captcha.py
11
+ src/python_rucaptcha/captcha_fox.py
11
12
  src/python_rucaptcha/capy_puzzle.py
12
13
  src/python_rucaptcha/control.py
13
14
  src/python_rucaptcha/coordinates_captcha.py
@@ -1 +0,0 @@
1
- __version__ = "6.3.2"