python3-capsolver 0.6__tar.gz → 0.6.1__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 (27) hide show
  1. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/PKG-INFO +16 -6
  2. python3-capsolver-0.6.1/python3_capsolver/__version__.py +1 -0
  3. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/control.py +0 -1
  4. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/datadome_slider.py +0 -1
  5. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/gee_test.py +0 -1
  6. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/hcaptcha.py +0 -1
  7. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/image_to_text.py +0 -1
  8. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/PKG-INFO +16 -6
  9. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/SOURCES.txt +0 -1
  10. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/setup.py +6 -2
  11. python3-capsolver-0.6/python3_capsolver/__version__.py +0 -1
  12. python3-capsolver-0.6/python3_capsolver/kasada.py +0 -176
  13. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/__init__.py +0 -0
  14. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/cloudflare.py +0 -0
  15. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/core/__init__.py +0 -0
  16. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/core/base.py +0 -0
  17. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/core/config.py +0 -0
  18. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/core/enum.py +0 -0
  19. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/core/serializer.py +0 -0
  20. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/fun_captcha.py +0 -0
  21. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/mt_captcha.py +0 -0
  22. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver/recaptcha.py +0 -0
  23. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/dependency_links.txt +0 -0
  24. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/not-zip-safe +0 -0
  25. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/requires.txt +0 -0
  26. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/python3_capsolver.egg-info/top_level.txt +0 -0
  27. {python3-capsolver-0.6 → python3-capsolver-0.6.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-capsolver
3
- Version: 0.6
3
+ Version: 0.6.1
4
4
  Summary: Python 3.7+ Capsolver library with AIO module.
5
5
  Home-page: https://andreidrang.github.io/python3-capsolver/
6
6
  Author: AndreiDrang
@@ -13,16 +13,19 @@ Keywords: captcha
13
13
  geetest
14
14
  hcaptcha
15
15
  capypuzzle
16
- tiktok
17
16
  rotatecaptcha
18
17
  funcaptcha
19
18
  keycaptcha
20
19
  python3
21
20
  python-library
22
21
  capsolver
23
- kasada
24
22
  datadomeslider
23
+ datadome
25
24
  mtcaptcha
25
+ turnstile
26
+ cloudflare
27
+ amazon
28
+ amazon_waf
26
29
  Classifier: License :: OSI Approved :: MIT License
27
30
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
28
31
  Classifier: Development Status :: 5 - Production/Stable
@@ -33,6 +36,7 @@ Classifier: Programming Language :: Python :: 3.7
33
36
  Classifier: Programming Language :: Python :: 3.8
34
37
  Classifier: Programming Language :: Python :: 3.9
35
38
  Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
36
40
  Classifier: Framework :: AsyncIO
37
41
  Classifier: Operating System :: Unix
38
42
  Classifier: Operating System :: Microsoft :: Windows
@@ -54,9 +58,10 @@ Description-Content-Type: text/markdown
54
58
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/323d4eda0fe1477bbea8fe8902b9e97e)](https://www.codacy.com/gh/AndreiDrang/python3-capsolver/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AndreiDrang/python3-capsolver&utm_campaign=Badge_Grade)
55
59
  [![codecov](https://codecov.io/gh/AndreiDrang/python3-capsolver/branch/main/graph/badge.svg?token=2L4VVIF4G8)](https://codecov.io/gh/AndreiDrang/python3-capsolver)
56
60
 
57
- [![Build check](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test_build.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test_build.yml)
58
- [![Installation check](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml)
59
- [![Test](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml)
61
+ [![Sphinx build](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/sphinx.yml/badge.svg?branch=release)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/sphinx.yml)
62
+ [![Build](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/build.yml)
63
+ [![Installation](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml)
64
+ [![Tests](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml)
60
65
  [![Lint](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/lint.yml)
61
66
 
62
67
 
@@ -94,6 +99,11 @@ Is described in the [documentation-website](https://andreidrang.github.io/python
94
99
  1. You need set ``API_KEY`` in your environment(get this value from you account).
95
100
  2. Run command ``make tests``, from root directory.
96
101
 
102
+
103
+ ### Changelog
104
+
105
+ Check [releases page](https://github.com/AndreiDrang/python3-capsolver/releases).
106
+
97
107
  ### How to get API Key to work with the library
98
108
  1. On the page - https://dashboard.capsolver.com/overview/user-center
99
109
  2. Find it: ![img.png](files/img.png)
@@ -0,0 +1 @@
1
+ __version__ = "0.6.1"
@@ -21,7 +21,6 @@ class Control(BaseCaptcha):
21
21
  *args,
22
22
  **kwargs,
23
23
  ):
24
-
25
24
  super().__init__(*args, **kwargs)
26
25
 
27
26
  def get_balance(self) -> ControlResponseSer:
@@ -64,7 +64,6 @@ class DatadomeSlider(BaseCaptcha):
64
64
  *args,
65
65
  **kwargs,
66
66
  ):
67
-
68
67
  super().__init__(*args, **kwargs)
69
68
 
70
69
  if captcha_type in DatadomeSliderTypeEnm.list():
@@ -71,7 +71,6 @@ class GeeTest(BaseCaptcha):
71
71
  def __init__(
72
72
  self, captcha_type: Union[GeeTestCaptchaTypeEnm, str], websiteURL: str, gt: str, challenge: str, *args, **kwargs
73
73
  ):
74
-
75
74
  super().__init__(*args, **kwargs)
76
75
 
77
76
  if captcha_type in GeeTestCaptchaTypeEnm.list():
@@ -78,7 +78,6 @@ class HCaptcha(BaseCaptcha):
78
78
  """
79
79
 
80
80
  def __init__(self, captcha_type: Union[HCaptchaTypeEnm, str], websiteURL: str, websiteKey: str, *args, **kwargs):
81
-
82
81
  super().__init__(*args, **kwargs)
83
82
 
84
83
  if captcha_type in HCaptchaTypeEnm.list():
@@ -76,7 +76,6 @@ class BaseImageToText(BaseCaptcha):
76
76
  sleep_time: int = 10,
77
77
  request_url: str = REQUEST_URL,
78
78
  ):
79
-
80
79
  super().__init__(api_key=api_key, sleep_time=sleep_time, request_url=request_url)
81
80
 
82
81
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python3-capsolver
3
- Version: 0.6
3
+ Version: 0.6.1
4
4
  Summary: Python 3.7+ Capsolver library with AIO module.
5
5
  Home-page: https://andreidrang.github.io/python3-capsolver/
6
6
  Author: AndreiDrang
@@ -13,16 +13,19 @@ Keywords: captcha
13
13
  geetest
14
14
  hcaptcha
15
15
  capypuzzle
16
- tiktok
17
16
  rotatecaptcha
18
17
  funcaptcha
19
18
  keycaptcha
20
19
  python3
21
20
  python-library
22
21
  capsolver
23
- kasada
24
22
  datadomeslider
23
+ datadome
25
24
  mtcaptcha
25
+ turnstile
26
+ cloudflare
27
+ amazon
28
+ amazon_waf
26
29
  Classifier: License :: OSI Approved :: MIT License
27
30
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
28
31
  Classifier: Development Status :: 5 - Production/Stable
@@ -33,6 +36,7 @@ Classifier: Programming Language :: Python :: 3.7
33
36
  Classifier: Programming Language :: Python :: 3.8
34
37
  Classifier: Programming Language :: Python :: 3.9
35
38
  Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
36
40
  Classifier: Framework :: AsyncIO
37
41
  Classifier: Operating System :: Unix
38
42
  Classifier: Operating System :: Microsoft :: Windows
@@ -54,9 +58,10 @@ Description-Content-Type: text/markdown
54
58
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/323d4eda0fe1477bbea8fe8902b9e97e)](https://www.codacy.com/gh/AndreiDrang/python3-capsolver/dashboard?utm_source=github.com&utm_medium=referral&utm_content=AndreiDrang/python3-capsolver&utm_campaign=Badge_Grade)
55
59
  [![codecov](https://codecov.io/gh/AndreiDrang/python3-capsolver/branch/main/graph/badge.svg?token=2L4VVIF4G8)](https://codecov.io/gh/AndreiDrang/python3-capsolver)
56
60
 
57
- [![Build check](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test_build.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test_build.yml)
58
- [![Installation check](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml)
59
- [![Test](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml)
61
+ [![Sphinx build](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/sphinx.yml/badge.svg?branch=release)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/sphinx.yml)
62
+ [![Build](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/build.yml)
63
+ [![Installation](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/install.yml)
64
+ [![Tests](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/test.yml)
60
65
  [![Lint](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/AndreiDrang/python3-capsolver/actions/workflows/lint.yml)
61
66
 
62
67
 
@@ -94,6 +99,11 @@ Is described in the [documentation-website](https://andreidrang.github.io/python
94
99
  1. You need set ``API_KEY`` in your environment(get this value from you account).
95
100
  2. Run command ``make tests``, from root directory.
96
101
 
102
+
103
+ ### Changelog
104
+
105
+ Check [releases page](https://github.com/AndreiDrang/python3-capsolver/releases).
106
+
97
107
  ### How to get API Key to work with the library
98
108
  1. On the page - https://dashboard.capsolver.com/overview/user-center
99
109
  2. Find it: ![img.png](files/img.png)
@@ -8,7 +8,6 @@ python3_capsolver/fun_captcha.py
8
8
  python3_capsolver/gee_test.py
9
9
  python3_capsolver/hcaptcha.py
10
10
  python3_capsolver/image_to_text.py
11
- python3_capsolver/kasada.py
12
11
  python3_capsolver/mt_captcha.py
13
12
  python3_capsolver/recaptcha.py
14
13
  python3_capsolver.egg-info/PKG-INFO
@@ -94,16 +94,19 @@ setup(
94
94
  geetest
95
95
  hcaptcha
96
96
  capypuzzle
97
- tiktok
98
97
  rotatecaptcha
99
98
  funcaptcha
100
99
  keycaptcha
101
100
  python3
102
101
  python-library
103
102
  capsolver
104
- kasada
105
103
  datadomeslider
104
+ datadome
106
105
  mtcaptcha
106
+ turnstile
107
+ cloudflare
108
+ amazon
109
+ amazon_waf
107
110
  """,
108
111
  python_requires=REQUIRES_PYTHON,
109
112
  zip_safe=False,
@@ -120,6 +123,7 @@ setup(
120
123
  "Programming Language :: Python :: 3.8",
121
124
  "Programming Language :: Python :: 3.9",
122
125
  "Programming Language :: Python :: 3.10",
126
+ "Programming Language :: Python :: 3.11",
123
127
  "Framework :: AsyncIO",
124
128
  "Operating System :: Unix",
125
129
  "Operating System :: Microsoft :: Windows",
@@ -1 +0,0 @@
1
- __version__ = "0.6"
@@ -1,176 +0,0 @@
1
- from typing import Union, Optional
2
-
3
- from python3_capsolver.core.base import BaseCaptcha
4
- from python3_capsolver.core.enum import ProxyType
5
- from python3_capsolver.core.config import REQUEST_URL
6
- from python3_capsolver.core.serializer import KasadaOptionsSer, CaptchaResponseSer, RequestCreateTaskSer
7
-
8
-
9
- class BaseKasada(BaseCaptcha):
10
- """
11
- The class is used to work with Capsolver AntiKasadaTask methods.
12
-
13
- Args:
14
- api_key: Capsolver API key
15
- pageURL: Address of a webpage with Kasada
16
- proxyType: Type of the proxy
17
- proxyAddress: Proxy IP address IPv4/IPv6. Not allowed to use:
18
- host names instead of IPs,
19
- transparent proxies (where client IP is visible),
20
- proxies from local networks (192.., 10.., 127...)
21
- proxyPort: Proxy port.
22
- proxyLogin: Login for proxy which requires authorizaiton (basic).
23
- This isn’t required if you are using proxies authenticated by IP
24
- proxyPassword: This isn’t required if you are using proxies authenticated by IP
25
- sleep_time: The waiting time between requests to get the result of the Captcha
26
- request_url: API address for sending requests
27
-
28
- Examples:
29
- >>> Kasada(api_key="CAI-1324...",
30
- ... pageURL="http://mywebsite.com/kasada",
31
- ... proxyType="http",
32
- ... proxyAddress="0.0.0.0",
33
- ... proxyPort=9090,
34
- ... proxyLogin="some_login",
35
- ... proxyPassword="some_password",
36
- ... ).captcha_handler()
37
- CaptchaResponseSer(errorId=False,
38
- errorCode=None,
39
- errorDescription=None,
40
- taskId='73bdcd28-6c77-4414-8....',
41
- status=<ResponseStatusEnm.Ready: 'ready'>,
42
- solution={
43
- "x-kpsdk-ct": "",
44
- "x-kpsdk-cd": "",
45
- "user-agent": "Mozilla/5.0 (Windows NT 10...."
46
- }
47
- )
48
-
49
- >>> Kasada(api_key="CAI-1324...",
50
- ... pageURL="http://mywebsite.com/kasada",
51
- ... proxyType="http",
52
- ... proxyAddress="0.0.0.0",
53
- ... proxyPort=9090,
54
- ... proxyLogin="some_login",
55
- ... proxyPassword="some_password",
56
- ... ).captcha_handler(userAgent="Mozilla/5.0 (pl.....")
57
- CaptchaResponseSer(errorId=False,
58
- errorCode=None,
59
- errorDescription=None,
60
- taskId='73bdcd28-6c77-4414-8....',
61
- status=<ResponseStatusEnm.Ready: 'ready'>,
62
- solution={
63
- "x-kpsdk-ct": "",
64
- "x-kpsdk-cd": "",
65
- "user-agent": "Mozilla/5.0 (Windows NT 10...."
66
- }
67
- )
68
-
69
- Returns:
70
- CaptchaResponseSer model with full server response
71
-
72
- Notes:
73
- https://captchaai.atlassian.net/wiki/spaces/CAPTCHAAI/pages/426407
74
- """
75
-
76
- def __init__(
77
- self,
78
- api_key: str,
79
- pageURL: str,
80
- proxyType: Union[ProxyType, str],
81
- proxyAddress: str,
82
- proxyPort: int,
83
- proxyLogin: str,
84
- proxyPassword: str,
85
- sleep_time: Optional[int] = 5,
86
- request_url: Optional[str] = REQUEST_URL,
87
- ):
88
- self.task_postfix = "/kasada/invoke"
89
-
90
- super().__init__(api_key=api_key, sleep_time=sleep_time, request_url=request_url)
91
-
92
- self.task_params = KasadaOptionsSer(**locals()).dict()
93
-
94
-
95
- class Kasada(BaseKasada):
96
- __doc__ = BaseKasada.__doc__
97
-
98
- def captcha_handler(self, **additional_params) -> CaptchaResponseSer:
99
- """
100
- Synchronous method for captcha solving
101
-
102
- Args:
103
- additional_params: Some additional parameters that will be used in creating the task
104
- and will be passed to the payload under ``task`` key.
105
- Like ``onlyCD``, ``userAgent`` and etc. - more info in service docs
106
-
107
- Examples:
108
- >>> Kasada(api_key="CAI-1324...",
109
- ... pageURL="http://mywebsite.com/kasada",
110
- ... proxyType="http",
111
- ... proxyAddress="0.0.0.0",
112
- ... proxyPort=9090,
113
- ... proxyLogin="some_login",
114
- ... proxyPassword="some_password",
115
- ... ).captcha_handler()
116
- CaptchaResponseSer(errorId=False,
117
- errorCode=None,
118
- errorDescription=None,
119
- taskId='73bdcd28-6c77-4414-8....',
120
- status=<ResponseStatusEnm.Ready: 'ready'>,
121
- solution={
122
- "x-kpsdk-ct": "",
123
- "x-kpsdk-cd": "",
124
- "user-agent": "Mozilla/5.0 (Windows NT 10...."
125
- }
126
- )
127
-
128
- Returns:
129
- CaptchaResponseSer model with full service response
130
-
131
- Notes:
132
- Check class docstring for more info
133
- """
134
- self.task_params.update({**additional_params})
135
- self._prepare_create_task_payload(serializer=RequestCreateTaskSer, create_params=self.task_params)
136
- return CaptchaResponseSer(**self._create_task(url_postfix=self.task_postfix))
137
-
138
- async def aio_captcha_handler(self, **additional_params) -> CaptchaResponseSer:
139
- """
140
- Asynchronous method for captcha solving
141
-
142
- Args:
143
- additional_params: Some additional parameters that will be used in creating the task
144
- and will be passed to the payload under ``task`` key.
145
- Like ``onlyCD``, ``userAgent`` and etc. - more info in service docs
146
-
147
- Examples:
148
- >>> await Kasada(api_key="CAI-1324...",
149
- ... pageURL="http://mywebsite.com/kasada",
150
- ... proxyType="http",
151
- ... proxyAddress="0.0.0.0",
152
- ... proxyPort=9090,
153
- ... proxyLogin="some_login",
154
- ... proxyPassword="some_password",
155
- ... ).aio_captcha_handler()
156
- CaptchaResponseSer(errorId=False,
157
- errorCode=None,
158
- errorDescription=None,
159
- taskId='73bdcd28-6c77-4414-8....',
160
- status=<ResponseStatusEnm.Ready: 'ready'>,
161
- solution={
162
- "x-kpsdk-ct": "",
163
- "x-kpsdk-cd": "",
164
- "user-agent": "Mozilla/5.0 (Windows NT 10...."
165
- }
166
- )
167
-
168
- Returns:
169
- CaptchaResponseSer model with full service response
170
-
171
- Notes:
172
- Check class docstring for more info
173
- """
174
- self.task_params.update({**additional_params})
175
- self._prepare_create_task_payload(serializer=RequestCreateTaskSer, create_params=self.task_params)
176
- return CaptchaResponseSer(**await self._aio_create_task(url_postfix=self.task_postfix))