python-rucaptcha 5.2__py3-none-any.whl → 5.2.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__ = "5.2"
1
+ __version__ = "5.2.1"
@@ -10,8 +10,8 @@ class AudioCaptcha(BaseCaptcha):
10
10
  def __init__(
11
11
  self,
12
12
  save_format: str = SaveFormatsEnm.TEMP.value,
13
- img_clearing: bool = True,
14
- img_path: str = "PythonRuCaptchaAudio",
13
+ audio_clearing: bool = True,
14
+ audio_path: str = "PythonRuCaptchaAudio",
15
15
  lang: str = "en",
16
16
  *args,
17
17
  **kwargs,
@@ -23,8 +23,8 @@ class AudioCaptcha(BaseCaptcha):
23
23
  rucaptcha_key: User API key
24
24
  save_format: The format in which the file will be saved, or as a temporary file - 'temp',
25
25
  or as a regular file to a folder created by the library - 'const'.
26
- img_clearing: True - delete file after solution, False - don't delete file after solution
27
- img_path: Folder to save captcha audio
26
+ audio_clearing: True - delete file after solution, False - don't delete file after solution
27
+ audio_path: Folder to save captcha audio
28
28
  lang: Captcha audio lang: `en`, `fr`, `de`, `el`, `pt`, `ru`
29
29
 
30
30
  Examples:
@@ -57,8 +57,8 @@ class AudioCaptcha(BaseCaptcha):
57
57
 
58
58
  super().__init__(method=AudioCaptchaEnm.AUDIO.value, *args, **kwargs)
59
59
  self.save_format = save_format
60
- self.img_clearing = img_clearing
61
- self.img_path = img_path
60
+ self.audio_clearing = audio_clearing
61
+ self.audio_path = audio_path
62
62
 
63
63
  self.post_payload.update({"lang": lang})
64
64
 
@@ -122,7 +122,7 @@ class AudioCaptcha(BaseCaptcha):
122
122
 
123
123
  # according to the value of the passed parameter, select the function to save the file
124
124
  if self.save_format == SaveFormatsEnm.CONST.value:
125
- self._file_const_saver(content, self.img_path, file_extension="mp3")
125
+ self._file_const_saver(content, self.audio_path, file_extension="mp3")
126
126
  self.post_payload.update({"body": base64.b64encode(content).decode("utf-8")})
127
127
 
128
128
  else:
@@ -192,7 +192,7 @@ class AudioCaptcha(BaseCaptcha):
192
192
 
193
193
  # according to the value of the passed parameter, select the function to save the file
194
194
  if self.save_format == SaveFormatsEnm.CONST.value:
195
- self._file_const_saver(content, self.img_path)
195
+ self._file_const_saver(content, self.audio_path, file_extension="mp3")
196
196
  self.post_payload.update({"body": base64.b64encode(content).decode("utf-8")})
197
197
 
198
198
  else:
@@ -204,5 +204,5 @@ class AudioCaptcha(BaseCaptcha):
204
204
  return await self._aio_processing_response()
205
205
 
206
206
  def __del__(self):
207
- if self.save_format == SaveFormatsEnm.CONST.value and self.img_clearing:
208
- shutil.rmtree(self.img_path)
207
+ if self.save_format == SaveFormatsEnm.CONST.value and self.audio_clearing:
208
+ shutil.rmtree(self.audio_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-rucaptcha
3
- Version: 5.2
3
+ Version: 5.2.1
4
4
  Summary: Python 3.7+ RuCaptcha library with AIO module.
5
5
  Home-page: https://andreidrang.github.io/python-rucaptcha/
6
6
  Author: AndreiDrang, redV0ID
@@ -1,9 +1,9 @@
1
1
  python_rucaptcha/SocketAPI.py,sha256=W_ZmEaNTMx--lvaYiLJyckWGt3P-gxoZf0qdxK-onb0,4291
2
2
  python_rucaptcha/TikTokCaptcha.py,sha256=PF1ZeV3tb1e2ig3w6kfqqHQzAMOhmGxKjiAyizBRzks,2122
3
3
  python_rucaptcha/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- python_rucaptcha/__version__.py,sha256=w-7iTykPeImrjtpuwfo7ztWT6laCATvHs7mwCtvIvZs,20
4
+ python_rucaptcha/__version__.py,sha256=Wz6OktWKdFA8wb3DR2SbK1ll5ntwA4r6J1py_6STnmA,22
5
5
  python_rucaptcha/amazon_waf.py,sha256=On5PdMYuyWp0DLdmnCs04CuYALEx-aKo0P-USsk-dgk,4385
6
- python_rucaptcha/audio_captcha.py,sha256=HFAzvEMwgqmjx3mu8_6az4T4YCqqcIzEB5pRc4V0Ojo,7879
6
+ python_rucaptcha/audio_captcha.py,sha256=4PPViYfpRksZ1CB8ATVUIgC2MtrgrSAMxDqdims7SJQ,7925
7
7
  python_rucaptcha/capy_puzzle.py,sha256=wgofttv2qp-7_xHClKE8E6jlV1ca0H4m9fw0ZVnq7RU,7077
8
8
  python_rucaptcha/control.py,sha256=xOLHFrXh2OCb-UFYI9Kxcxkj_B4CX2FsLqMHCWjoMHI,13476
9
9
  python_rucaptcha/fun_captcha.py,sha256=0IdsCe_4HxSgtdhBb3B6w_LaSel89IUEQYL7_m2D2i4,3859
@@ -23,7 +23,7 @@ python_rucaptcha/core/config.py,sha256=SRbH3ENNpVLwqCkXU_cqVILkSqtorUlkYBs-_XMXY
23
23
  python_rucaptcha/core/enums.py,sha256=QYdnxgALuplSD5dWkW16OP5dMcRCT3BHXPWBKIBFHag,2109
24
24
  python_rucaptcha/core/result_handler.py,sha256=OPCpfaItugyUMLJsrNaUZhZAHjb3wzHUOGO02av5KoE,3390
25
25
  python_rucaptcha/core/serializer.py,sha256=2C-qTZIDNtH-ENqGORpguOQBnkSbkC1Ka1Ig5aT8Hd8,4617
26
- python_rucaptcha-5.2.dist-info/METADATA,sha256=Cl_toq1iSuzrVQWU3UIDBR48wQvTR1n7bUm3ug0qddM,5658
27
- python_rucaptcha-5.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
28
- python_rucaptcha-5.2.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
29
- python_rucaptcha-5.2.dist-info/RECORD,,
26
+ python_rucaptcha-5.2.1.dist-info/METADATA,sha256=Rd2bf75L8_HIi2l4ZLtwTuu7Z6s9RvqujOZxYRp5ylA,5660
27
+ python_rucaptcha-5.2.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
28
+ python_rucaptcha-5.2.1.dist-info/top_level.txt,sha256=Eu_atEB79Y7jCsfXPcXF5N8OLt6kKVbvhuRsI1BmSWM,17
29
+ python_rucaptcha-5.2.1.dist-info/RECORD,,