capmonster-python 3.0.0__py3-none-any.whl → 3.2.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,5 @@ 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
13
+ from .aws_waf import AmazonWafTask
@@ -0,0 +1,22 @@
1
+ from .capmonster import Capmonster
2
+
3
+ class AmazonWafTask(Capmonster):
4
+ def __init__(self, client_key):
5
+ super(AmazonWafTask, self).__init__(client_key)
6
+
7
+ def create_task(self, website_url: str, website_key: str, challenge_script: str, captcha_script: str,
8
+ context: str, iv: str, cookieSolution: bool = False):
9
+ data = {
10
+ "clientKey": self._client_key,
11
+ "task": {
12
+ "type": "AmazonTaskProxyless",
13
+ "websiteURL": website_url,
14
+ "websiteKey": website_key,
15
+ "challengeScript": challenge_script,
16
+ "captchaScript": captcha_script,
17
+ "context": context,
18
+ "iv": iv,
19
+ "cookieSolution": cookieSolution
20
+ }
21
+ }
22
+ return self._make_request("createTask", data).get("taskId")
@@ -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.2.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,7 @@
1
- capmonster_python/__init__.py,sha256=9rQthHrlBItDfV3mh0Ex6GgWAvQyhq90PH0csKfoseY,452
1
+ capmonster_python/__init__.py,sha256=FQBdZY4HVFL3nDPjpHCMcxo6gT9owqrrWlrqEp1pCUU,516
2
+ capmonster_python/aws_waf.py,sha256=KDjCkK12hF4-aCWEFCf_7b02rN7RUPW-GK6m5IrQVz4,861
2
3
  capmonster_python/capmonster.py,sha256=0gJw9iLl8XQvqk1eOgv9oOZ_929VS4r7dIv2ixbF9S0,9026
3
- capmonster_python/compleximage.py,sha256=NjsJBR7AlNeo9-1KMxUMCL4PkJm_nL_g8JiFgIk3Xgs,2048
4
+ capmonster_python/compleximage.py,sha256=D0DDPTu5Ntw6f7ZGvv9k11HPAogb43KSjqQlRl1uJoQ,2086
4
5
  capmonster_python/datadome.py,sha256=5GQbIiiHN2jYF5il3z7p7_mkac1X7ejx8jkK5-T4RbI,615
5
6
  capmonster_python/fun_captcha.py,sha256=bHXsfmrfaDCiV43EiUpr5N8U5VnY0xZFB7876AMDCnA,1207
6
7
  capmonster_python/geetest.py,sha256=LUMdvkh4jtOQORkllRQgBn5pjvOlhqlajZtzUppliUA,928
@@ -9,10 +10,11 @@ capmonster_python/image_to_text.py,sha256=V268ZeaVfTQHpfHkq5trxMQeLxZskv4r5_3xYj
9
10
  capmonster_python/recaptcha_v2.py,sha256=6fm1Lu3vHMZioHuW475nJ5_nMElgpOKru67x_lPC12c,1035
10
11
  capmonster_python/recaptcha_v2_enterprise.py,sha256=Ms8sN4FaA9M16PNkGB5tTP0SBW9H-WQaoh157ewtYG8,1191
11
12
  capmonster_python/recaptcha_v3.py,sha256=Yuvvc03FMALSki0WqJqAXGmNVpZqmtqDmhsY7LEP0fE,866
13
+ capmonster_python/tendi.py,sha256=NCGkdSDXfy_-96aXsYfXfLLQOByKQmy0R4Wn9AJ4FFw,604
12
14
  capmonster_python/turnstile.py,sha256=nS_wny8y5KahEa28NlCaOS8cC_WNffL2xWyZSC08pyw,782
13
15
  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,,
16
+ capmonster_python-3.2.0.dist-info/LICENSE,sha256=dsx0VlJZP5DI64ranPoTdQuDmNvrABI9QNm-PctMmM4,1055
17
+ capmonster_python-3.2.0.dist-info/METADATA,sha256=cMVRldNlvN3Jy11SW9pUKCSuGRL5P-zv1Jrm4bZcEpY,4070
18
+ capmonster_python-3.2.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
+ capmonster_python-3.2.0.dist-info/top_level.txt,sha256=QW5VEUvOJfzDxYpD7fSJtGfUxhM3m7U7LFcZ-wRpU70,18
20
+ capmonster_python-3.2.0.dist-info/RECORD,,