python-rucaptcha 6.8.0__tar.gz → 6.8.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 (97) hide show
  1. {python_rucaptcha-6.8.0/src/python_rucaptcha.egg-info → python_rucaptcha-6.8.2}/PKG-INFO +3 -2
  2. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/pyproject.toml +19 -1
  3. python_rucaptcha-6.8.2/src/python_rucaptcha/__version__.py +1 -0
  4. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/base.py +2 -2
  5. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/result_handler.py +2 -2
  6. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/vk_captcha.py +8 -2
  7. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2/src/python_rucaptcha.egg-info}/PKG-INFO +3 -2
  8. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha.egg-info/requires.txt +1 -1
  9. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_altcha.py +2 -2
  10. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_image.py +8 -8
  11. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_rotate.py +10 -10
  12. python_rucaptcha-6.8.0/src/python_rucaptcha/__version__.py +0 -1
  13. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/LICENSE +0 -0
  14. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/MANIFEST.in +0 -0
  15. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/README.md +0 -0
  16. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/setup.cfg +0 -0
  17. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/__init__.py +0 -0
  18. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/alibaba_captcha.py +0 -0
  19. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/altcha_captcha.py +0 -0
  20. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/amazon_waf.py +0 -0
  21. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/atb_captcha.py +0 -0
  22. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/audio_captcha.py +0 -0
  23. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/basilisk_captcha.py +0 -0
  24. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/binance_captcha.py +0 -0
  25. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/bounding_box_captcha.py +0 -0
  26. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/captcha_fox.py +0 -0
  27. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/captchaai.py +0 -0
  28. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/capy_puzzle.py +0 -0
  29. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/control.py +0 -0
  30. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/coordinates_captcha.py +0 -0
  31. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/__init__.py +0 -0
  32. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/captchaai.py +0 -0
  33. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/config.py +0 -0
  34. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/data/__init__.py +0 -0
  35. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/data/captchaai_legacy_profiles.json +0 -0
  36. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/data/captchaai_profiles.json +0 -0
  37. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/enums.py +0 -0
  38. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/core/serializer.py +0 -0
  39. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/cutcaptcha.py +0 -0
  40. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/cyber_siara_captcha.py +0 -0
  41. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/datadome_captcha.py +0 -0
  42. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/draw_around_captcha.py +0 -0
  43. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/friendly_captcha.py +0 -0
  44. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/fun_captcha.py +0 -0
  45. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/gee_test.py +0 -0
  46. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/grid_captcha.py +0 -0
  47. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/hcaptcha.py +0 -0
  48. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/image_captcha.py +0 -0
  49. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/incapsula_captcha.py +0 -0
  50. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/key_captcha.py +0 -0
  51. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/lemin_captcha.py +0 -0
  52. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/mt_captcha.py +0 -0
  53. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/prosopo.py +0 -0
  54. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/re_captcha.py +0 -0
  55. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/rotate_captcha.py +0 -0
  56. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/temu_captcha.py +0 -0
  57. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/tencent.py +0 -0
  58. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/text_captcha.py +0 -0
  59. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/tspd_captcha.py +0 -0
  60. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/turnstile.py +0 -0
  61. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/yandex_smart_captcha.py +0 -0
  62. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha/yidun_captcha.py +0 -0
  63. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha.egg-info/SOURCES.txt +0 -0
  64. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha.egg-info/dependency_links.txt +0 -0
  65. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/src/python_rucaptcha.egg-info/top_level.txt +0 -0
  66. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_alibaba.py +0 -0
  67. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_amazon.py +0 -0
  68. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_audio.py +0 -0
  69. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_basilisk.py +0 -0
  70. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_binance.py +0 -0
  71. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_bounding_box.py +0 -0
  72. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_captchaai.py +0 -0
  73. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_capypuzzle.py +0 -0
  74. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_control.py +0 -0
  75. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_coordinates.py +0 -0
  76. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_core.py +0 -0
  77. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_cutcaptcha.py +0 -0
  78. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_cybersiara.py +0 -0
  79. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_datadome.py +0 -0
  80. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_draw_around.py +0 -0
  81. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_friendly_captcha.py +0 -0
  82. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_funcaptcha.py +0 -0
  83. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_geetest.py +0 -0
  84. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_grid.py +0 -0
  85. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_hcaptcha.py +0 -0
  86. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_incapsula.py +0 -0
  87. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_key_captcha.py +0 -0
  88. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_lemin.py +0 -0
  89. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_mtcaptcha.py +0 -0
  90. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_recaptcha.py +0 -0
  91. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_tencent.py +0 -0
  92. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_text.py +0 -0
  93. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_tspd.py +0 -0
  94. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_turnstile.py +0 -0
  95. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_vk_captcha.py +0 -0
  96. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_yandex_smart_captcha.py +0 -0
  97. {python_rucaptcha-6.8.0 → python_rucaptcha-6.8.2}/tests/test_yidun_captcha.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-rucaptcha
3
- Version: 6.8.0
3
+ Version: 6.8.2
4
4
  Summary: Python 3.9+ RuCaptcha library with AIO module.
5
5
  Author-email: AndreiDrang <python-captcha@pm.me>
6
6
  License-Expression: MIT
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
22
23
  Classifier: Framework :: AsyncIO
23
24
  Classifier: Operating System :: Unix
24
25
  Classifier: Operating System :: Microsoft :: Windows
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
30
  Requires-Dist: requests>=2.21.0
30
31
  Requires-Dist: aiohttp>=3.9.2
31
- Requires-Dist: msgspec<0.21,>=0.18
32
+ Requires-Dist: msgspec<0.23,>=0.18
32
33
  Requires-Dist: tenacity<10,>=8
33
34
  Dynamic: license-file
34
35
 
@@ -24,6 +24,7 @@ length_sort = true
24
24
  [tool.pytest.ini_options]
25
25
  minversion = "7.0"
26
26
  asyncio_mode = "auto"
27
+ asyncio_default_fixture_loop_scope = "function"
27
28
  testpaths = [
28
29
  "tests",
29
30
  ]
@@ -83,6 +84,7 @@ classifiers = [
83
84
  "Programming Language :: Python :: 3.11",
84
85
  "Programming Language :: Python :: 3.12",
85
86
  "Programming Language :: Python :: 3.13",
87
+ "Programming Language :: Python :: 3.14",
86
88
  "Framework :: AsyncIO",
87
89
  "Operating System :: Unix",
88
90
  "Operating System :: Microsoft :: Windows",
@@ -91,7 +93,7 @@ classifiers = [
91
93
  dependencies = [
92
94
  "requests>=2.21.0",
93
95
  "aiohttp>=3.9.2",
94
- "msgspec>=0.18,<0.21",
96
+ "msgspec>=0.18,<0.23",
95
97
  "tenacity>=8,<10"
96
98
  ]
97
99
 
@@ -111,3 +113,19 @@ Documentation = "https://andreidrang.github.io/python-rucaptcha/"
111
113
  Repository = "https://github.com/AndreiDrang/python-rucaptcha"
112
114
  Issues = "https://github.com/AndreiDrang/python-rucaptcha/issues"
113
115
  Changelog = "https://github.com/AndreiDrang/python-rucaptcha/releases"
116
+
117
+ [dependency-groups]
118
+ dev = [
119
+ "autoflake>=2.3.1",
120
+ "black>=24.8.0",
121
+ "coverage>=7.6.1",
122
+ "isort>=5.13.2",
123
+ "pytest>=8.3.5",
124
+ "pytest-asyncio>=0.24.0",
125
+ ]
126
+ docs = [
127
+ "enum-tools[sphinx]>=0.13.0",
128
+ "myst-parser>=3.0.1",
129
+ "pallets-sphinx-themes>=2.3.0",
130
+ "sphinx>=7.1.2,<9", # <9: enum-tools 0.13 cannot import from Sphinx 9
131
+ ]
@@ -0,0 +1 @@
1
+ __version__ = "6.8.2"
@@ -104,7 +104,7 @@ class BaseCaptcha:
104
104
  return response.to_dict()
105
105
  except Exception as error:
106
106
  self.result.errorId = 12
107
- self.result.errorCode = self.NO_CAPTCHA_ERR
107
+ self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
108
108
  self.result.errorDescription = str(error)
109
109
  return self.result.to_dict()
110
110
 
@@ -157,7 +157,7 @@ class BaseCaptcha:
157
157
  return response.to_dict()
158
158
  except Exception as error:
159
159
  self.result.errorId = 12
160
- self.result.errorCode = self.NO_CAPTCHA_ERR
160
+ self.result.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
161
161
  self.result.errorDescription = str(error)
162
162
  return self.result.to_dict()
163
163
 
@@ -55,7 +55,7 @@ def get_sync_result(
55
55
  except Exception as error:
56
56
  response_ser.status = "failed"
57
57
  response_ser.errorId = 12
58
- response_ser.errorCode = "System error"
58
+ response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
59
59
  response_ser.errorDescription = str(error)
60
60
  return response_ser.to_dict()
61
61
 
@@ -110,6 +110,6 @@ async def get_async_result(
110
110
  except Exception as error:
111
111
  response_ser.status = "failed"
112
112
  response_ser.errorId = 12
113
- response_ser.errorCode = "System error"
113
+ response_ser.errorCode = "ERROR_CAPTCHA_UNSOLVABLE"
114
114
  response_ser.errorDescription = str(error)
115
115
  return response_ser.to_dict()
@@ -7,7 +7,7 @@ from .core.enums import VKCaptchaEnm, SaveFormatsEnm
7
7
  class VKCaptcha(BaseCaptcha):
8
8
  def __init__(
9
9
  self,
10
- method: Union[str, VKCaptchaEnm] = VKCaptchaEnm.VKCaptchaTask,
10
+ method: Union[str, VKCaptchaEnm, None] = None,
11
11
  redirectUri: Optional[str] = None,
12
12
  userAgent: Optional[str] = None,
13
13
  proxyType: Optional[str] = None,
@@ -113,6 +113,12 @@ class VKCaptcha(BaseCaptcha):
113
113
 
114
114
  https://rucaptcha.com/api-docs/vk-captcha
115
115
  """
116
+ # VKCaptchaTask is the default task type. Its required fields are only
117
+ # validated when VKCaptchaTask is selected explicitly via ``method``.
118
+ method_passed = method is not None
119
+ if method is None:
120
+ method = VKCaptchaEnm.VKCaptchaTask
121
+
116
122
  super().__init__(method=method, *args, **kwargs)
117
123
 
118
124
  if method not in VKCaptchaEnm.list_values():
@@ -123,7 +129,7 @@ class VKCaptcha(BaseCaptcha):
123
129
  self.img_path = img_path
124
130
 
125
131
  if method == VKCaptchaEnm.VKCaptchaTask:
126
- if not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
132
+ if method_passed and not all([redirectUri, userAgent, proxyType, proxyAddress, proxyPort]):
127
133
  raise ValueError(
128
134
  "redirectUri, userAgent, proxyType, proxyAddress, "
129
135
  "and proxyPort are required for VKCaptchaTask"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-rucaptcha
3
- Version: 6.8.0
3
+ Version: 6.8.2
4
4
  Summary: Python 3.9+ RuCaptcha library with AIO module.
5
5
  Author-email: AndreiDrang <python-captcha@pm.me>
6
6
  License-Expression: MIT
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
22
23
  Classifier: Framework :: AsyncIO
23
24
  Classifier: Operating System :: Unix
24
25
  Classifier: Operating System :: Microsoft :: Windows
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
30
  Requires-Dist: requests>=2.21.0
30
31
  Requires-Dist: aiohttp>=3.9.2
31
- Requires-Dist: msgspec<0.21,>=0.18
32
+ Requires-Dist: msgspec<0.23,>=0.18
32
33
  Requires-Dist: tenacity<10,>=8
33
34
  Dynamic: license-file
34
35
 
@@ -1,4 +1,4 @@
1
1
  requests>=2.21.0
2
2
  aiohttp>=3.9.2
3
- msgspec<0.21,>=0.18
3
+ msgspec<0.23,>=0.18
4
4
  tenacity<10,>=8
@@ -136,7 +136,7 @@ class TestAltcha(BaseTest):
136
136
  assert isinstance(result["solution"], dict) is True
137
137
  assert isinstance(result["taskId"], int) is True
138
138
  else:
139
- assert result["errorId"] in (1, 12)
139
+ assert result["errorId"] in (1, 12, 15)
140
140
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
141
141
 
142
142
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -157,7 +157,7 @@ class TestAltcha(BaseTest):
157
157
  assert isinstance(result["solution"], dict) is True
158
158
  assert isinstance(result["taskId"], int) is True
159
159
  else:
160
- assert result["errorId"] in (1, 12)
160
+ assert result["errorId"] in (1, 12, 15)
161
161
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
162
162
 
163
163
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -50,8 +50,8 @@ class TestImageCaptcha(BaseTest):
50
50
  assert isinstance(result["solution"]["text"], str) is True
51
51
  assert isinstance(result["taskId"], int) is True
52
52
  else:
53
- assert result["errorId"] in (1, 12)
54
- assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
53
+ assert result["errorId"] in (1, 12, 15)
54
+ assert result["errorCode"] in ("ERROR_CAPTCHA_UNSOLVABLE", "ERROR_IMAGE_TYPE_NOT_SUPPORTED")
55
55
 
56
56
  @pytest.mark.parametrize("save_format", SaveFormatsEnm.list_values())
57
57
  def test_basic_file(self, save_format):
@@ -65,7 +65,7 @@ class TestImageCaptcha(BaseTest):
65
65
  assert isinstance(result["solution"]["text"], str) is True
66
66
  assert isinstance(result["taskId"], int) is True
67
67
  else:
68
- assert result["errorId"] in (1, 12)
68
+ assert result["errorId"] in (1, 12, 15)
69
69
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
70
70
 
71
71
  @pytest.mark.parametrize("save_format", SaveFormatsEnm.list_values())
@@ -82,7 +82,7 @@ class TestImageCaptcha(BaseTest):
82
82
  assert isinstance(result["solution"]["text"], str) is True
83
83
  assert isinstance(result["taskId"], int) is True
84
84
  else:
85
- assert result["errorId"] in (1, 12)
85
+ assert result["errorId"] in (1, 12, 15)
86
86
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
87
87
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
88
88
 
@@ -98,8 +98,8 @@ class TestImageCaptcha(BaseTest):
98
98
  assert isinstance(result["solution"]["text"], str) is True
99
99
  assert isinstance(result["taskId"], int) is True
100
100
  else:
101
- assert result["errorId"] in (1, 12)
102
- assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
101
+ assert result["errorId"] in (1, 12, 15)
102
+ assert result["errorCode"] in ("ERROR_CAPTCHA_UNSOLVABLE", "ERROR_IMAGE_TYPE_NOT_SUPPORTED")
103
103
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
104
104
 
105
105
  @pytest.mark.parametrize("save_format", SaveFormatsEnm.list_values())
@@ -114,7 +114,7 @@ class TestImageCaptcha(BaseTest):
114
114
  assert isinstance(result["solution"]["text"], str) is True
115
115
  assert isinstance(result["taskId"], int) is True
116
116
  else:
117
- assert result["errorId"] in (1, 12)
117
+ assert result["errorId"] in (1, 12, 15)
118
118
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
119
119
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
120
120
 
@@ -131,7 +131,7 @@ class TestImageCaptcha(BaseTest):
131
131
  assert isinstance(result["solution"]["text"], str) is True
132
132
  assert isinstance(result["taskId"], int) is True
133
133
  else:
134
- assert result["errorId"] in (1, 12)
134
+ assert result["errorId"] in (1, 12, 15)
135
135
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
136
136
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
137
137
 
@@ -46,8 +46,8 @@ class TestRotateCaptcha(BaseTest):
46
46
  assert isinstance(result["solution"]["rotate"], int) is True
47
47
  assert isinstance(result["taskId"], int) is True
48
48
  else:
49
- assert result["errorId"] in (1, 12)
50
- assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
49
+ assert result["errorId"] in (1, 12, 15)
50
+ assert result["errorCode"] in ("ERROR_CAPTCHA_UNSOLVABLE", "ERROR_IMAGE_TYPE_NOT_SUPPORTED")
51
51
 
52
52
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
53
53
 
@@ -62,7 +62,7 @@ class TestRotateCaptcha(BaseTest):
62
62
  assert isinstance(result["solution"]["rotate"], int) is True
63
63
  assert isinstance(result["taskId"], int) is True
64
64
  else:
65
- assert result["errorId"] in (1, 12)
65
+ assert result["errorId"] in (1, 12, 15)
66
66
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
67
67
 
68
68
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -79,7 +79,7 @@ class TestRotateCaptcha(BaseTest):
79
79
  assert isinstance(result["solution"]["rotate"], int) is True
80
80
  assert isinstance(result["taskId"], int) is True
81
81
  else:
82
- assert result["errorId"] in (1, 12)
82
+ assert result["errorId"] in (1, 12, 15)
83
83
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
84
84
 
85
85
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -95,8 +95,8 @@ class TestRotateCaptcha(BaseTest):
95
95
  assert isinstance(result["solution"]["rotate"], int) is True
96
96
  assert isinstance(result["taskId"], int) is True
97
97
  else:
98
- assert result["errorId"] in (1, 12)
99
- assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
98
+ assert result["errorId"] in (1, 12, 15)
99
+ assert result["errorCode"] in ("ERROR_CAPTCHA_UNSOLVABLE", "ERROR_IMAGE_TYPE_NOT_SUPPORTED")
100
100
 
101
101
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
102
102
 
@@ -111,7 +111,7 @@ class TestRotateCaptcha(BaseTest):
111
111
  assert isinstance(result["solution"]["rotate"], int) is True
112
112
  assert isinstance(result["taskId"], int) is True
113
113
  else:
114
- assert result["errorId"] in (1, 12)
114
+ assert result["errorId"] in (1, 12, 15)
115
115
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
116
116
 
117
117
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -128,7 +128,7 @@ class TestRotateCaptcha(BaseTest):
128
128
  assert isinstance(result["solution"]["rotate"], int) is True
129
129
  assert isinstance(result["taskId"], int) is True
130
130
  else:
131
- assert result["errorId"] in (1, 12)
131
+ assert result["errorId"] in (1, 12, 15)
132
132
  assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
133
133
 
134
134
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
@@ -148,8 +148,8 @@ class TestRotateCaptcha(BaseTest):
148
148
  assert isinstance(result["solution"]["rotate"], int) is True
149
149
  assert isinstance(result["taskId"], int) is True
150
150
  else:
151
- assert result["errorId"] in (1, 12)
152
- assert result["errorCode"] == "ERROR_CAPTCHA_UNSOLVABLE"
151
+ assert result["errorId"] in (1, 12, 15)
152
+ assert result["errorCode"] in ("ERROR_CAPTCHA_UNSOLVABLE", "ERROR_IMAGE_TYPE_NOT_SUPPORTED")
153
153
 
154
154
  assert result.keys() == GetTaskResultResponseSer().to_dict().keys()
155
155
 
@@ -1 +0,0 @@
1
- __version__ = "6.8.0"