python-rucaptcha 6.2__py3-none-any.whl → 6.3.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.
@@ -1 +1 @@
1
- __version__ = "6.2"
1
+ __version__ = "6.3.1"
@@ -75,7 +75,9 @@ class atbCaptcha(BaseCaptcha):
75
75
  """
76
76
  super().__init__(method=method, *args, **kwargs)
77
77
 
78
- self.create_task_payload["task"].update({"websiteURL": websiteURL, "appId": appId, "apiServer": apiServer})
78
+ self.create_task_payload["task"].update(
79
+ {"websiteURL": websiteURL, "appId": appId, "apiServer": apiServer}
80
+ )
79
81
 
80
82
  # check user params
81
83
  if method not in atbCaptchaEnm.list_values():
@@ -12,7 +12,13 @@ from requests.adapters import HTTPAdapter
12
12
 
13
13
  from .enums import ServiceEnm, SaveFormatsEnm
14
14
  from .config import RETRIES, ASYNC_RETRIES
15
- from .serializer import TaskSer, CaptchaOptionsSer, CreateTaskBaseSer, GetTaskResultRequestSer, GetTaskResultResponseSer
15
+ from .serializer import (
16
+ TaskSer,
17
+ CaptchaOptionsSer,
18
+ CreateTaskBaseSer,
19
+ GetTaskResultRequestSer,
20
+ GetTaskResultResponseSer,
21
+ )
16
22
  from .result_handler import get_sync_result, get_async_result
17
23
 
18
24
 
@@ -79,7 +85,9 @@ class BaseCaptcha:
79
85
  time.sleep(self.params.sleep_time)
80
86
 
81
87
  return get_sync_result(
82
- get_payload=self.get_task_payload, sleep_time=self.params.sleep_time, url_response=self.params.url_response
88
+ get_payload=self.get_task_payload,
89
+ sleep_time=self.params.sleep_time,
90
+ url_response=self.params.url_response,
83
91
  )
84
92
 
85
93
  def url_open(self, url: str, **kwargs):
@@ -174,7 +182,9 @@ class BaseCaptcha:
174
182
  )
175
183
  # if the file is transferred in base64 encoding
176
184
  elif captcha_base64:
177
- self.create_task_payload["task"].update({"body": base64.b64encode(captcha_base64).decode("utf-8")})
185
+ self.create_task_payload["task"].update(
186
+ {"body": base64.b64encode(captcha_base64).decode("utf-8")}
187
+ )
178
188
  # if a URL is passed
179
189
  elif captcha_link:
180
190
  try:
@@ -209,7 +219,9 @@ class BaseCaptcha:
209
219
  )
210
220
  # if the file is transferred in base64 encoding
211
221
  elif captcha_base64:
212
- self.create_task_payload["task"].update({"body": base64.b64encode(captcha_base64).decode("utf-8")})
222
+ self.create_task_payload["task"].update(
223
+ {"body": base64.b64encode(captcha_base64).decode("utf-8")}
224
+ )
213
225
  # if a URL is passed
214
226
  elif captcha_link:
215
227
  try:
@@ -10,7 +10,9 @@ from .config import attempts_generator
10
10
  from .serializer import GetTaskResultRequestSer, GetTaskResultResponseSer
11
11
 
12
12
 
13
- def get_sync_result(get_payload: GetTaskResultRequestSer, sleep_time: int, url_response: str) -> Union[dict, Exception]:
13
+ def get_sync_result(
14
+ get_payload: GetTaskResultRequestSer, sleep_time: int, url_response: str
15
+ ) -> Union[dict, Exception]:
14
16
  """
15
17
  Function periodically send the SYNC request to service and wait for captcha solving result
16
18
  """
@@ -48,7 +50,9 @@ async def get_async_result(
48
50
  for _ in attempts:
49
51
  try:
50
52
  # send a request for the result of solving the captcha
51
- async with session.post(url_response, json=get_payload.to_dict(), raise_for_status=True) as resp:
53
+ async with session.post(
54
+ url_response, json=get_payload.to_dict(), raise_for_status=True
55
+ ) as resp:
52
56
  captcha_response = await resp.json(content_type=None)
53
57
  captcha_response = GetTaskResultResponseSer(**captcha_response, taskId=get_payload.taskId)
54
58
 
@@ -81,7 +81,9 @@ class CutCaptcha(BaseCaptcha):
81
81
  """
82
82
  super().__init__(method=method, *args, **kwargs)
83
83
 
84
- self.create_task_payload["task"].update({"websiteURL": websiteURL, "miseryKey": miseryKey, "apiKey": apiKey})
84
+ self.create_task_payload["task"].update(
85
+ {"websiteURL": websiteURL, "miseryKey": miseryKey, "apiKey": apiKey}
86
+ )
85
87
 
86
88
  # check user params
87
89
  if method not in CutCaptchaEnm.list_values():
@@ -20,8 +20,10 @@ class DataDomeCaptcha(BaseCaptcha):
20
20
  Args:
21
21
  rucaptcha_key: User API key
22
22
  websiteURL: Full URL of the captcha page
23
- captchaUrl: The value of the `src` parameter for the `iframe` element containing the captcha on the page.
24
- userAgent: User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents
23
+ captchaUrl: The value of the `src` parameter for the `iframe` element
24
+ containing the captcha on the page.
25
+ userAgent: User-Agent of your browser will be used to load the captcha.
26
+ Use only modern browser's User-Agents
25
27
  proxyType: Proxy type - `http`, `socks4`, `socks5`
26
28
  proxyAddress: Proxy IP address or hostname
27
29
  proxyPort: Proxy port
@@ -69,7 +69,9 @@ class FunCaptcha(BaseCaptcha):
69
69
  """
70
70
  super().__init__(method=method, *args, **kwargs)
71
71
 
72
- self.create_task_payload["task"].update({"websiteURL": websiteURL, "websitePublicKey": websitePublicKey})
72
+ self.create_task_payload["task"].update(
73
+ {"websiteURL": websiteURL, "websitePublicKey": websitePublicKey}
74
+ )
73
75
 
74
76
  # check user params
75
77
  if method not in FunCaptchaEnm.list_values():
@@ -78,7 +78,9 @@ class LeminCaptcha(BaseCaptcha):
78
78
  """
79
79
  super().__init__(method=method, *args, **kwargs)
80
80
 
81
- self.create_task_payload["task"].update({"websiteURL": websiteURL, "captchaId": captchaId, "div_id": div_id})
81
+ self.create_task_payload["task"].update(
82
+ {"websiteURL": websiteURL, "captchaId": captchaId, "div_id": div_id}
83
+ )
82
84
 
83
85
  # check user params
84
86
  if method not in LeminCaptchaEnm.list_values():
@@ -74,7 +74,8 @@ class RotateCaptcha(BaseCaptcha):
74
74
  }
75
75
 
76
76
  >>> await RotateCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
77
- ... angle=45).aio_captcha_handler(captcha_file="examples/rotate/rotate_ex.png")
77
+ ... angle=45).aio_captcha_handler(
78
+ ... captcha_file="examples/rotate/rotate_ex.png")
78
79
  {
79
80
  "errorId":0,
80
81
  "status":"ready",
@@ -19,7 +19,8 @@ class Tencent(BaseCaptcha):
19
19
  Args:
20
20
  rucaptcha_key: User API key
21
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
22
+ We do not open the page, not a problem if it is available
23
+ only for authenticated users
23
24
  appId: The value of `appId` parameter in the website source code.
24
25
  method: Captcha type
25
26
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-rucaptcha
3
- Version: 6.2
3
+ Version: 6.3.1
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
@@ -9,7 +9,7 @@ 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
- 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
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
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
15
15
  Classifier: Development Status :: 5 - Production/Stable
@@ -27,22 +27,18 @@ Classifier: Operating System :: MacOS
27
27
  Requires-Python: >=3.9
28
28
  Description-Content-Type: text/markdown
29
29
  License-File: LICENSE
30
- Requires-Dist: requests >=2.21.0
31
- Requires-Dist: aiohttp >=3.9.2
32
- Requires-Dist: msgspec ==0.18.*
33
- Requires-Dist: tenacity ==8.*
30
+ Requires-Dist: requests>=2.21.0
31
+ Requires-Dist: aiohttp>=3.9.2
32
+ Requires-Dist: msgspec==0.18.*
33
+ Requires-Dist: tenacity<10,>=8
34
34
 
35
35
  # python-rucaptcha
36
36
 
37
- ![Logo](https://red-panda-dev.xyz/media/images/RuCaptchaHigh_zkkPoYF.original.png)
37
+ [![RuCaptchaHigh.png](https://s.vyjava.xyz/files/2024/12-December/17/45247a56/RuCaptchaHigh.png)](https://vyjava.xyz/dashboard/image/45247a56-3332-48ee-8df8-fc95bcfc52f0)
38
38
 
39
- ### [Capsolver](https://capsolver.com?utm_source=github&utm_medium=banner_github&utm_campaign=python-rucaptcha)
39
+ ### [Capsolver](https://www.capsolver.com/?utm_source=github&utm_medium=repo&utm_campaign=scraping&utm_term=python-rucaptcha)
40
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.
41
+ [![capsolver.jpg](https://s.vyjava.xyz/files/2024/12-December/17/54e1db0e/capsolver.jpg)](https://www.capsolver.com/?utm_source=github&utm_medium=repo&utm_campaign=scraping&utm_term=python-rucaptcha)
46
42
 
47
43
  <hr>
48
44
 
@@ -75,13 +71,6 @@ If you have any questions, please send a message to the [Telegram](https://t.me/
75
71
 
76
72
  Or email python-captcha@pm.me
77
73
 
78
- ***
79
-
80
- You can check our other projects here - [RedPandaDev group](https://red-panda-dev.xyz/blog/). For example - [Torrents Tracker bot](https://t.me/torrents_tracker_bot) for Telegram.
81
-
82
- ***
83
-
84
-
85
74
  ## How to install?
86
75
 
87
76
  ### pip
@@ -114,4 +103,4 @@ For full changelog info check - [Releases page](https://github.com/AndreiDrang/p
114
103
 
115
104
  ### Get API Key to work with the library
116
105
  1. On the page - https://rucaptcha.com/enterpage
117
- 2. Find it: ![img.png](https://github.com/AndreiDrang/python-rucaptcha/blob/master/files/img.png)
106
+ 2. Find it: [![img.png](https://s.vyjava.xyz/files/2024/12-December/17/ac679557/img.png)](https://vyjava.xyz/dashboard/image/ac679557-f3cc-402f-bf95-6c45d252a2ef)
@@ -1,38 +1,38 @@
1
1
  python_rucaptcha/__init__.py,sha256=odkQWtwx2RgIjD8pw2ZF-KR-5nL0Yu2Wn7Mu2YdBrSk,61
2
- python_rucaptcha/__version__.py,sha256=isdrfznaMU6K6jV8dZxKDsUEcVdFOgaOY6kYVYAf_2Q,20
2
+ python_rucaptcha/__version__.py,sha256=pM7gHyeWFY4GDFAxcDi8cHwCw8YNk6zQN8QWLwNdwI4,22
3
3
  python_rucaptcha/amazon_waf.py,sha256=psEg-sym8xQlMPPto1ND_HE0vGV_SRRrDnsKuEbbxNA,3625
4
- python_rucaptcha/atb_captcha.py,sha256=HLY_ZGQLx0ej6NLZ4X-9L6RE9K4LfT8bWZZBnBnz_lA,3701
4
+ python_rucaptcha/atb_captcha.py,sha256=r3oCvrLrhYpyUz5tJdbgCzurSmlrIw4xpipcKFoTRP8,3723
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
8
  python_rucaptcha/control.py,sha256=2oBlvCnEV_tEsb8_1V-rrL7RLZZ5JTdGB5IcqDLFTUE,4988
9
9
  python_rucaptcha/coordinates_captcha.py,sha256=lmotaD_dOzo2T9MdcaOgQdB5opL-Hs-ZVUW5nTy-KJ0,9911
10
- python_rucaptcha/cutcaptcha.py,sha256=8FVoIoKyKXL-znpkJUscsR9Q4n-2nWGfBBpWUXTiQFQ,4028
10
+ python_rucaptcha/cutcaptcha.py,sha256=glhvQe8Q35ap7J5dyD7hcXkcswG27fkJpYsvyIoTTRg,4050
11
11
  python_rucaptcha/cyber_siara_captcha.py,sha256=P8oLkn3UZDuy3XjEyd59cK2QOHYesV6KQ5pMbw2deiA,3909
12
- python_rucaptcha/datadome_captcha.py,sha256=sf6VdBWB3S7xTCyy83odJTHZHQmi6a2TNSFSFnSh__Y,4140
12
+ python_rucaptcha/datadome_captcha.py,sha256=6ab7vDjYjUT4X_H5VJuAcuGtfUcBidzY-5vo7YH4lWY,4196
13
13
  python_rucaptcha/draw_around_captcha.py,sha256=uUaVk--31p0xh6sqTxtRdtxl0F4ZQ9KeESpmqY1WPR0,11837
14
14
  python_rucaptcha/friendly_captcha.py,sha256=c5sbhAHq5zPlk2-5gGcoPhjslEkBT24EtFip2S8cGao,4232
15
- python_rucaptcha/fun_captcha.py,sha256=hz-ulRnuzqyk8vAXaT52aZ_EyH_mf_VwauGVfjR8rV8,3496
15
+ python_rucaptcha/fun_captcha.py,sha256=iU_twFRGKjeQPPBXfcqEK0d0kffNaCxPpHrihzBRg5w,3518
16
16
  python_rucaptcha/gee_test.py,sha256=lxhqWm2uWWS_uQK5ufArjr-508pfecDYAEh4Ct-FthI,8583
17
17
  python_rucaptcha/grid_captcha.py,sha256=ssfl1BnBzxR1CHGdnjEG4wunTvEk9NvGIoiXQWHrt20,9001
18
18
  python_rucaptcha/hcaptcha.py,sha256=7i0S7A4LvBePUgVsCGpay8733Ve2rzjiZcR-CMTwa8s,3732
19
19
  python_rucaptcha/image_captcha.py,sha256=jWTO-kLSKXG12koO2X9dsFXCr3OjvXgj2aNJyhSomf4,8391
20
20
  python_rucaptcha/key_captcha.py,sha256=hufzqYEb3ZR23AsLWIL82HFTJnA8JsOJtXUA92b9tws,4017
21
- python_rucaptcha/lemin_captcha.py,sha256=vM9_Dk4TYdL3Y1w5JVyQVmeO32Mmhwz-_DBqTigjcYY,4064
21
+ python_rucaptcha/lemin_captcha.py,sha256=inEq-UWUbMX9aZdpyZBGRER-67YCS3PqxnDIpPAzmqM,4086
22
22
  python_rucaptcha/mt_captcha.py,sha256=usQK_LR9piDQM7lxkZbSKi6KIXedIBYyytKJBJe8jNg,3415
23
23
  python_rucaptcha/re_captcha.py,sha256=XyJncVbmaV5jZR-qxZ1JdFum10W5yk5zeVrDbZ5dSKo,6083
24
- python_rucaptcha/rotate_captcha.py,sha256=V-mJZ672Nw8yXjDcEa9TBc_guuMn9C-7ole-hYODenk,6225
25
- python_rucaptcha/tencent.py,sha256=2k4Br086e1ytzqRn8x35sK8jaAJcvp6QD58fI9s4d3w,3620
24
+ python_rucaptcha/rotate_captcha.py,sha256=o9y9SVLPI6G6NqK1siv3xbOSYm7PGNquJbbhXuxTIDE,6278
25
+ python_rucaptcha/tencent.py,sha256=vKCx0R2RYZYwT_3gBVBSZbwqtSBKHw6tq7SS-2oHy0s,3648
26
26
  python_rucaptcha/text_captcha.py,sha256=lZDPwTgpMLvqvfjPbT-uNuNu6JRdWTEE9qfjnRQ5y-A,3708
27
27
  python_rucaptcha/turnstile.py,sha256=VpmYGYJoRVX6NHipO6-g2U5EpwxZToAZRmULj4ReDD0,3686
28
28
  python_rucaptcha/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- python_rucaptcha/core/base.py,sha256=e_5e9q5xaEcz7Wi9l-chdxz5vPpOTm6PpblaBtMkMfw,9315
29
+ python_rucaptcha/core/base.py,sha256=MvP0zQspHUmAgI8mZle_sYhs7H0ynUKwdhz5PwaIx4c,9425
30
30
  python_rucaptcha/core/config.py,sha256=UHP9iAaW3VpVC_7eHz_ihkYWIMAA9t_UXERfs5LwKiM,553
31
31
  python_rucaptcha/core/enums.py,sha256=3YAUEcI2xXibufgQlbSWElC7c0pwb9jp0HW8tdnsL-8,3797
32
- python_rucaptcha/core/result_handler.py,sha256=uaeRMGP8Sagi7_Vh845lpvNXuNy4nVwgRKOsCKf2vXI,2680
32
+ python_rucaptcha/core/result_handler.py,sha256=LJskNbfgsOdxwzXoNknzVPzCnxBrSR6EwsvOJgs0aD8,2724
33
33
  python_rucaptcha/core/serializer.py,sha256=asJRFD14uwOXG8gaNqsfaukiPBbsxt4r0rDA7lCuNHk,1739
34
- python_rucaptcha-6.2.dist-info/LICENSE,sha256=N_utAsqhTp1pXXp-PTE-CFMg5BfIIqTbF-phwwzOHeQ,1063
35
- python_rucaptcha-6.2.dist-info/METADATA,sha256=_oKWDGp24Xl2cH5e-OudjHBYNkSnO0gGt1XHppklYRQ,8831
36
- python_rucaptcha-6.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
37
- python_rucaptcha-6.2.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
38
- python_rucaptcha-6.2.dist-info/RECORD,,
34
+ python_rucaptcha-6.3.1.dist-info/LICENSE,sha256=N_utAsqhTp1pXXp-PTE-CFMg5BfIIqTbF-phwwzOHeQ,1063
35
+ python_rucaptcha-6.3.1.dist-info/METADATA,sha256=af1dPtdP8WGNOx25uTA-lJyGDC8omUXRxskUX9Vige0,6457
36
+ python_rucaptcha-6.3.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
37
+ python_rucaptcha-6.3.1.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
38
+ python_rucaptcha-6.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5