capmonster-python 2.6.0__py3-none-any.whl → 2.6.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.
@@ -0,0 +1,19 @@
1
+ from .capmonster import UserAgent
2
+
3
+
4
+ class DataDomeTask(UserAgent):
5
+ def __init__(self, client_key):
6
+ super(DataDomeTask, self).__init__(client_key)
7
+
8
+ def create_task(self, website_url: str, metadata: object):
9
+ data = {
10
+ "client_key": self._client_key,
11
+ "task": {
12
+ "type": "CustomTask",
13
+ "class": "DataDome",
14
+ "websiteURL": website_url,
15
+ "metadata": metadata,
16
+ }
17
+ }
18
+ data, is_user_agent = self._add_user_agent(data)
19
+ return self._make_request("createTask", data=data).get("taskId")
@@ -1,12 +1,13 @@
1
- from .capmonster import Proxy, UserAgent
2
1
  from typing import Union
2
+ from .capmonster import Proxy, UserAgent
3
+
3
4
 
4
5
  class RecaptchaV2EnterpriseTask(UserAgent, Proxy):
5
6
  def __init__(self, client_key):
6
7
  super(RecaptchaV2EnterpriseTask, self).__init__(client_key)
7
8
 
8
9
  def create_task(self, website_url: str, website_key: str,
9
- enterprise_payload = None, api_domain: str = None,
10
+ enterprise_payload=None, api_domain: str = None,
10
11
  cookies: Union[dict, list, str] = None,
11
12
  no_cache: bool = None):
12
13
  data = {
@@ -17,7 +17,7 @@ def check_response():
17
17
  @wraps(f)
18
18
  def wrap(*args, **kwargs):
19
19
  rf = f(*args, **kwargs)
20
- if type(rf) == dict:
20
+ if type(rf) is dict:
21
21
  if rf.get("errorId") == 0:
22
22
  return rf
23
23
  else:
@@ -29,5 +29,7 @@ def check_response():
29
29
  error_code="CAPMONSTER_API_ERROR",
30
30
  error_description="Sometimes can be happen if capmonster_python "
31
31
  "servers there is too much intensity")
32
+
32
33
  return wrap
34
+
33
35
  return checker
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: capmonster_python
3
- Version: 2.6.0
3
+ Version: 2.6.1
4
4
  Summary: capmonster.cloud library for Python
5
5
  Home-page: https://github.com/alperensert/capmonster_python
6
6
  Author: Alperen Sert
@@ -29,20 +29,23 @@ Requires-Dist: six
29
29
 
30
30
  Capmonster.cloud for Python
31
31
  =
32
- ![PyPI - Wheel](https://img.shields.io/pypi/wheel/capmonster-python?style=plastic) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/capmonster_python?style=flat) ![GitHub last commit](https://img.shields.io/github/last-commit/alperensert/capmonster_python?style=flat) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/alperensert/capmonster_python?style=flat) ![PyPI - Downloads](https://img.shields.io/pypi/dm/capmonster_python?style=flat) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/alperensert/capmonster_python?style=flat) ![GitHub Repo stars](https://img.shields.io/github/stars/alperensert/capmonster_python?style=social)
32
+ ![PyPI - Wheel](https://img.shields.io/pypi/wheel/capmonster-python?style=plastic) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/capmonster_python?style=flat) ![GitHub last commit](https://img.shields.io/github/last-commit/alperensert/capmonster_python?style=flat) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/alperensert/capmonster_python?style=flat) ![PyPI - Downloads](https://img.shields.io/pypi/dm/capmonster_python?style=flat) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/alperensert/capmonster_python?style=flat) ![GitHub Repo stars](https://img.shields.io/github/stars/alperensert/capmonster_python?style=social)
33
33
 
34
34
  [Capmonster.cloud](https://capmonster.cloud) package for Python3
35
35
 
36
- If you have any problem with usage, [read the documentation](https://alperensert.github.io/capmonster_python) or [create an issue](https://github.com/alperensert/capmonster_python/issues/new)
36
+ If you have any problem with usage, [read the documentation](https://alperensert.github.io/capmonster_python)
37
+ or [create an issue](https://github.com/alperensert/capmonster_python/issues/new)
37
38
 
38
39
  *At least 2x cheaper, up to 30x faster than manual recognition services.*
39
40
 
40
41
  ### Installation
42
+
41
43
  ```
42
44
  pip install capmonster_python
43
45
  ```
44
46
 
45
47
  ### Supported captcha types
48
+
46
49
  - Image to text
47
50
  - Recaptcha v2
48
51
  - Recaptcha v2 Enterprise
@@ -51,6 +54,7 @@ pip install capmonster_python
51
54
  - HCaptcha
52
55
  - GeeTest
53
56
  - Turnstile Task
57
+ - Data Dome
54
58
 
55
59
  Usage examples
56
60
  -
@@ -95,7 +99,7 @@ from capmonster_python import GeeTestTask
95
99
 
96
100
  capmonster = GeeTestTask("API_KEY")
97
101
  task_id = capmonster.create_task("website_url", "gt", "challenge")
98
- result= capmonster.join_task_result(task_id)
102
+ result = capmonster.join_task_result(task_id)
99
103
  print(result.get("challenge"))
100
104
  print(result.get("seccode"))
101
105
  print(result.get("validate"))
@@ -1,17 +1,18 @@
1
1
  capmonster_python/__init__.py,sha256=uF6-lErPDl0YVcEfPFg3Lc9SV877BxFEEOPZapqdyp0,415
2
2
  capmonster_python/capmonster.py,sha256=zCiK-jzLbCwjAY9qb8pM86PE5W2gQXurCBrcU2uOHR4,8963
3
3
  capmonster_python/compleximage.py,sha256=NjsJBR7AlNeo9-1KMxUMCL4PkJm_nL_g8JiFgIk3Xgs,2048
4
+ capmonster_python/datadome.py,sha256=5GQbIiiHN2jYF5il3z7p7_mkac1X7ejx8jkK5-T4RbI,615
4
5
  capmonster_python/fun_captcha.py,sha256=bHXsfmrfaDCiV43EiUpr5N8U5VnY0xZFB7876AMDCnA,1207
5
6
  capmonster_python/geetest.py,sha256=LUMdvkh4jtOQORkllRQgBn5pjvOlhqlajZtzUppliUA,928
6
7
  capmonster_python/hcaptcha.py,sha256=MJB8zfqxYBFsflQVeVngC17NQkUCFuHcqRLBJml6nUQ,1528
7
8
  capmonster_python/image_to_text.py,sha256=V268ZeaVfTQHpfHkq5trxMQeLxZskv4r5_3xYjMYejc,1828
8
9
  capmonster_python/recaptcha_v2.py,sha256=6fm1Lu3vHMZioHuW475nJ5_nMElgpOKru67x_lPC12c,1035
9
- capmonster_python/recaptcha_v2_enterprise.py,sha256=5svDHX7aVfdOwdvmkZ72eMoryWNHbTWMiPXbpZEmOgw,1192
10
+ capmonster_python/recaptcha_v2_enterprise.py,sha256=Ms8sN4FaA9M16PNkGB5tTP0SBW9H-WQaoh157ewtYG8,1191
10
11
  capmonster_python/recaptcha_v3.py,sha256=Yuvvc03FMALSki0WqJqAXGmNVpZqmtqDmhsY7LEP0fE,866
11
12
  capmonster_python/turnstile.py,sha256=1mvF6Q5gndzdQhRwanNItN5YUvo_SeM-yLjnx5zMUUg,703
12
- capmonster_python/utils.py,sha256=10IAtWI_k92nTxbKwCdGTh_14U7vXZyXbQyteN0zDkM,1380
13
- capmonster_python-2.6.0.dist-info/LICENSE,sha256=dsx0VlJZP5DI64ranPoTdQuDmNvrABI9QNm-PctMmM4,1055
14
- capmonster_python-2.6.0.dist-info/METADATA,sha256=gF_wadWggGFT2iHesFf0sGIdDYWvvipTmPuaGfIAsXI,4056
15
- capmonster_python-2.6.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
16
- capmonster_python-2.6.0.dist-info/top_level.txt,sha256=QW5VEUvOJfzDxYpD7fSJtGfUxhM3m7U7LFcZ-wRpU70,18
17
- capmonster_python-2.6.0.dist-info/RECORD,,
13
+ capmonster_python/utils.py,sha256=kcHEYw-JqDXHPI8baBdRjdV1UKVo8oOriKhqfDgXxYI,1382
14
+ capmonster_python-2.6.1.dist-info/LICENSE,sha256=dsx0VlJZP5DI64ranPoTdQuDmNvrABI9QNm-PctMmM4,1055
15
+ capmonster_python-2.6.1.dist-info/METADATA,sha256=0oKOjW580CndFkwAGngODWfDXmeozaUh9ITmZGpwTq0,4070
16
+ capmonster_python-2.6.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
17
+ capmonster_python-2.6.1.dist-info/top_level.txt,sha256=QW5VEUvOJfzDxYpD7fSJtGfUxhM3m7U7LFcZ-wRpU70,18
18
+ capmonster_python-2.6.1.dist-info/RECORD,,