capmonster-python 2.6.0__tar.gz → 2.6.1__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 (23) hide show
  1. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/PKG-INFO +8 -4
  2. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/README.md +7 -3
  3. capmonster_python-2.6.1/capmonster_python/datadome.py +19 -0
  4. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/recaptcha_v2_enterprise.py +3 -2
  5. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/utils.py +3 -1
  6. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python.egg-info/PKG-INFO +8 -4
  7. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python.egg-info/SOURCES.txt +1 -0
  8. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/setup.py +1 -1
  9. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/LICENSE +0 -0
  10. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/__init__.py +0 -0
  11. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/capmonster.py +0 -0
  12. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/compleximage.py +0 -0
  13. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/fun_captcha.py +0 -0
  14. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/geetest.py +0 -0
  15. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/hcaptcha.py +0 -0
  16. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/image_to_text.py +0 -0
  17. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/recaptcha_v2.py +0 -0
  18. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/recaptcha_v3.py +0 -0
  19. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python/turnstile.py +0 -0
  20. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python.egg-info/dependency_links.txt +0 -0
  21. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python.egg-info/requires.txt +0 -0
  22. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/capmonster_python.egg-info/top_level.txt +0 -0
  23. {capmonster_python-2.6.0 → capmonster_python-2.6.1}/setup.cfg +0 -0
@@ -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,19 +1,22 @@
1
1
  Capmonster.cloud for Python
2
2
  =
3
- ![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)
3
+ ![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)
4
4
 
5
5
  [Capmonster.cloud](https://capmonster.cloud) package for Python3
6
6
 
7
- 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)
7
+ If you have any problem with usage, [read the documentation](https://alperensert.github.io/capmonster_python)
8
+ or [create an issue](https://github.com/alperensert/capmonster_python/issues/new)
8
9
 
9
10
  *At least 2x cheaper, up to 30x faster than manual recognition services.*
10
11
 
11
12
  ### Installation
13
+
12
14
  ```
13
15
  pip install capmonster_python
14
16
  ```
15
17
 
16
18
  ### Supported captcha types
19
+
17
20
  - Image to text
18
21
  - Recaptcha v2
19
22
  - Recaptcha v2 Enterprise
@@ -22,6 +25,7 @@ pip install capmonster_python
22
25
  - HCaptcha
23
26
  - GeeTest
24
27
  - Turnstile Task
28
+ - Data Dome
25
29
 
26
30
  Usage examples
27
31
  -
@@ -66,7 +70,7 @@ from capmonster_python import GeeTestTask
66
70
 
67
71
  capmonster = GeeTestTask("API_KEY")
68
72
  task_id = capmonster.create_task("website_url", "gt", "challenge")
69
- result= capmonster.join_task_result(task_id)
73
+ result = capmonster.join_task_result(task_id)
70
74
  print(result.get("challenge"))
71
75
  print(result.get("seccode"))
72
76
  print(result.get("validate"))
@@ -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"))
@@ -5,6 +5,7 @@ setup.py
5
5
  capmonster_python/__init__.py
6
6
  capmonster_python/capmonster.py
7
7
  capmonster_python/compleximage.py
8
+ capmonster_python/datadome.py
8
9
  capmonster_python/fun_captcha.py
9
10
  capmonster_python/geetest.py
10
11
  capmonster_python/hcaptcha.py
@@ -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="2.6.0",
10
+ version="2.6.1",
11
11
  packages=["capmonster_python"],
12
12
  url="https://github.com/alperensert/capmonster_python",
13
13
  long_description=long_description,