capmonster-python 3.0.0__tar.gz → 3.1.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 (24) hide show
  1. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/PKG-INFO +1 -1
  2. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/__init__.py +1 -0
  3. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/compleximage.py +3 -1
  4. capmonster_python-3.1.0/capmonster_python/tendi.py +19 -0
  5. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python.egg-info/PKG-INFO +1 -1
  6. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python.egg-info/SOURCES.txt +1 -0
  7. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/setup.py +1 -1
  8. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/LICENSE +0 -0
  9. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/README.md +0 -0
  10. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/capmonster.py +0 -0
  11. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/datadome.py +0 -0
  12. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/fun_captcha.py +0 -0
  13. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/geetest.py +0 -0
  14. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/hcaptcha.py +0 -0
  15. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/image_to_text.py +0 -0
  16. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/recaptcha_v2.py +0 -0
  17. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/recaptcha_v2_enterprise.py +0 -0
  18. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/recaptcha_v3.py +0 -0
  19. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/turnstile.py +0 -0
  20. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python/utils.py +0 -0
  21. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python.egg-info/dependency_links.txt +0 -0
  22. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python.egg-info/requires.txt +0 -0
  23. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/capmonster_python.egg-info/top_level.txt +0 -0
  24. {capmonster_python-3.0.0 → capmonster_python-3.1.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: capmonster_python
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: capmonster.cloud library for Python
5
5
  Home-page: https://github.com/alperensert/capmonster_python
6
6
  Author: Alperen Sert
@@ -9,3 +9,4 @@ from .utils import CapmonsterException
9
9
  from .compleximage import ComplexImageTask
10
10
  from .datadome import DataDomeTask
11
11
  from .turnstile import TurnstileTask
12
+ from .tendi import TenDITask
@@ -2,6 +2,8 @@ from .capmonster import UserAgent
2
2
 
3
3
 
4
4
  class ComplexImageTask(UserAgent):
5
+ __VALID_CLASSES = ["recaptcha", "hcaptcha"]
6
+
5
7
  def __init__(self, client_key):
6
8
  super(ComplexImageTask, self).__init__(client_key)
7
9
 
@@ -11,7 +13,7 @@ class ComplexImageTask(UserAgent):
11
13
  images_base64: list = None,
12
14
  task: str = None,
13
15
  websiteUrl: str = None):
14
- if _class != "recaptcha" or _class != "hcaptcha":
16
+ if _class not in self.__VALID_CLASSES:
15
17
  raise ValueError("Currently only recaptcha or hcaptcha is supported as _class value.")
16
18
  data = {
17
19
  "clientKey": self._client_key,
@@ -0,0 +1,19 @@
1
+ from .capmonster import UserAgent
2
+
3
+ class TenDITask(UserAgent):
4
+ def __init__(self, client_key):
5
+ super(TenDITask, self).__init__(client_key)
6
+
7
+ def create_task(self, website_url: str, website_key: str):
8
+ data = {
9
+ "clientKey": self._client_key,
10
+ "task": {
11
+ "type": "CustomTask",
12
+ "class": "TenDI",
13
+ "websiteURL": website_url,
14
+ "websiteKey": website_key
15
+ }
16
+ }
17
+
18
+ data, is_user_agent = self._add_user_agent(data)
19
+ return self._make_request("createTask", data).get("taskId")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: capmonster_python
3
- Version: 3.0.0
3
+ Version: 3.1.0
4
4
  Summary: capmonster.cloud library for Python
5
5
  Home-page: https://github.com/alperensert/capmonster_python
6
6
  Author: Alperen Sert
@@ -13,6 +13,7 @@ capmonster_python/image_to_text.py
13
13
  capmonster_python/recaptcha_v2.py
14
14
  capmonster_python/recaptcha_v2_enterprise.py
15
15
  capmonster_python/recaptcha_v3.py
16
+ capmonster_python/tendi.py
16
17
  capmonster_python/turnstile.py
17
18
  capmonster_python/utils.py
18
19
  capmonster_python.egg-info/PKG-INFO
@@ -7,7 +7,7 @@ with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
7
7
 
8
8
  setup(
9
9
  name="capmonster_python",
10
- version="3.0.0",
10
+ version="3.1.0",
11
11
  packages=["capmonster_python"],
12
12
  url="https://github.com/alperensert/capmonster_python",
13
13
  long_description=long_description,