capmonster-python 3.0.0__py3-none-any.whl → 3.1.0__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.
@@ -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
@@ -1,6 +1,6 @@
1
- capmonster_python/__init__.py,sha256=9rQthHrlBItDfV3mh0Ex6GgWAvQyhq90PH0csKfoseY,452
1
+ capmonster_python/__init__.py,sha256=WUwMExpEtB8_TlH8kESbXXLp4Rt6ZYuJcrfSupWLa1o,481
2
2
  capmonster_python/capmonster.py,sha256=0gJw9iLl8XQvqk1eOgv9oOZ_929VS4r7dIv2ixbF9S0,9026
3
- capmonster_python/compleximage.py,sha256=NjsJBR7AlNeo9-1KMxUMCL4PkJm_nL_g8JiFgIk3Xgs,2048
3
+ capmonster_python/compleximage.py,sha256=D0DDPTu5Ntw6f7ZGvv9k11HPAogb43KSjqQlRl1uJoQ,2086
4
4
  capmonster_python/datadome.py,sha256=5GQbIiiHN2jYF5il3z7p7_mkac1X7ejx8jkK5-T4RbI,615
5
5
  capmonster_python/fun_captcha.py,sha256=bHXsfmrfaDCiV43EiUpr5N8U5VnY0xZFB7876AMDCnA,1207
6
6
  capmonster_python/geetest.py,sha256=LUMdvkh4jtOQORkllRQgBn5pjvOlhqlajZtzUppliUA,928
@@ -9,10 +9,11 @@ capmonster_python/image_to_text.py,sha256=V268ZeaVfTQHpfHkq5trxMQeLxZskv4r5_3xYj
9
9
  capmonster_python/recaptcha_v2.py,sha256=6fm1Lu3vHMZioHuW475nJ5_nMElgpOKru67x_lPC12c,1035
10
10
  capmonster_python/recaptcha_v2_enterprise.py,sha256=Ms8sN4FaA9M16PNkGB5tTP0SBW9H-WQaoh157ewtYG8,1191
11
11
  capmonster_python/recaptcha_v3.py,sha256=Yuvvc03FMALSki0WqJqAXGmNVpZqmtqDmhsY7LEP0fE,866
12
+ capmonster_python/tendi.py,sha256=NCGkdSDXfy_-96aXsYfXfLLQOByKQmy0R4Wn9AJ4FFw,604
12
13
  capmonster_python/turnstile.py,sha256=nS_wny8y5KahEa28NlCaOS8cC_WNffL2xWyZSC08pyw,782
13
14
  capmonster_python/utils.py,sha256=kcHEYw-JqDXHPI8baBdRjdV1UKVo8oOriKhqfDgXxYI,1382
14
- capmonster_python-3.0.0.dist-info/LICENSE,sha256=dsx0VlJZP5DI64ranPoTdQuDmNvrABI9QNm-PctMmM4,1055
15
- capmonster_python-3.0.0.dist-info/METADATA,sha256=gx34wC2ugSmPedd8QobyPTdfuB_fBmer-iZZQyGUYJo,4070
16
- capmonster_python-3.0.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
17
- capmonster_python-3.0.0.dist-info/top_level.txt,sha256=QW5VEUvOJfzDxYpD7fSJtGfUxhM3m7U7LFcZ-wRpU70,18
18
- capmonster_python-3.0.0.dist-info/RECORD,,
15
+ capmonster_python-3.1.0.dist-info/LICENSE,sha256=dsx0VlJZP5DI64ranPoTdQuDmNvrABI9QNm-PctMmM4,1055
16
+ capmonster_python-3.1.0.dist-info/METADATA,sha256=MoqTxNNQ_Oe46MNfaAJ_wZR6bLzgDXXSPyw5qXHBG20,4070
17
+ capmonster_python-3.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
18
+ capmonster_python-3.1.0.dist-info/top_level.txt,sha256=QW5VEUvOJfzDxYpD7fSJtGfUxhM3m7U7LFcZ-wRpU70,18
19
+ capmonster_python-3.1.0.dist-info/RECORD,,