[English](README.md) | [中文版](README_zh.md)
## English
EzCaptcha SDK for python
### Install
```
pip install ezcaptcha
```
### Usage
Sample:
```python
from ezcaptcha import EzCaptcha
# Recaptcha
ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"type": ez.AllTaskType.RecaptchaV2TaskProxyless, # or use str "RecaptchaV2TaskProxyless"
"isInvisible": False
}, print_log=True)
if solution.get("errorId") == 0:
# Get captcha token result
captcha_token = solution.get("token")
print(captcha_token)
else:
print(solution.get("errorDesc"))
# Funcaptcha
solution = ez.solve({
"websiteURL": "https://iframe.arkoselabs.com",
"websiteKey": "B7D8911C-5CC8-A9A3-35B0-554ACEE604DA",
"type": ez.AllTaskType.FuncaptchaTaskProxyless, # or use str "FuncaptchaTaskProxyless"
}, print_log=True)
```
Specify the language of log output and prompts, support "en" and "zh", default "en"
```python
from ezcaptcha import EzCaptcha
ez = EzCaptcha(client_key="yourapiKey", lang="zh")
...
```
Enable log printing function
```python
from ezcaptcha import EzCaptcha
ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"type": "RecaptchaV2TaskProxyless",
"isInvisible": False,
}, print_log=True)
```
Specific waiting_interval(default 3s) and waiting_timeout(default 120s)
```python
from ezcaptcha import EzCaptcha
ez = EzCaptcha(client_key="yourapiKey")
solution = ez.solve({
"websiteURL": "https://www.google.com/recaptcha/api2/demo",
"websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
"type": "RecaptchaV2TaskProxyless",
"isInvisible": False,
}, waiting_interval=1, waiting_timeout=90, print_log=True)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ez-captcha/ezcaptcha-python",
"name": "ezcaptcha",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "EzCaptcha python sdk",
"author": "EzCaptcha",
"author_email": "dev@ez-captcha.com",
"download_url": "",
"platform": null,
"description": "[English](README.md) | [\u4e2d\u6587\u7248](README_zh.md)\r\n## English\r\nEzCaptcha SDK for python\r\n### Install\r\n```\r\npip install ezcaptcha\r\n```\r\n### Usage\r\nSample: \r\n```python\r\nfrom ezcaptcha import EzCaptcha\r\n\r\n# Recaptcha\r\nez = EzCaptcha(client_key=\"yourapiKey\")\r\nsolution = ez.solve({\r\n \"websiteURL\": \"https://www.google.com/recaptcha/api2/demo\",\r\n \"websiteKey\": \"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\",\r\n \"type\": ez.AllTaskType.RecaptchaV2TaskProxyless, # or use str \"RecaptchaV2TaskProxyless\"\r\n \"isInvisible\": False\r\n}, print_log=True)\r\nif solution.get(\"errorId\") == 0:\r\n # Get captcha token result\r\n captcha_token = solution.get(\"token\")\r\n print(captcha_token)\r\nelse:\r\n print(solution.get(\"errorDesc\"))\r\n\r\n# Funcaptcha\r\nsolution = ez.solve({\r\n \"websiteURL\": \"https://iframe.arkoselabs.com\",\r\n \"websiteKey\": \"B7D8911C-5CC8-A9A3-35B0-554ACEE604DA\",\r\n \"type\": ez.AllTaskType.FuncaptchaTaskProxyless, # or use str \"FuncaptchaTaskProxyless\"\r\n}, print_log=True)\r\n```\r\n\r\nSpecify the language of log output and prompts, support \"en\" and \"zh\", default \"en\"\r\n```python\r\nfrom ezcaptcha import EzCaptcha\r\n\r\nez = EzCaptcha(client_key=\"yourapiKey\", lang=\"zh\")\r\n...\r\n```\r\nEnable log printing function\r\n```python\r\nfrom ezcaptcha import EzCaptcha\r\n\r\nez = EzCaptcha(client_key=\"yourapiKey\")\r\nsolution = ez.solve({\r\n \"websiteURL\": \"https://www.google.com/recaptcha/api2/demo\",\r\n \"websiteKey\": \"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\",\r\n \"type\": \"RecaptchaV2TaskProxyless\",\r\n \"isInvisible\": False,\r\n}, print_log=True)\r\n```\r\n\r\nSpecific waiting_interval(default 3s) and waiting_timeout(default 120s)\r\n```python\r\nfrom ezcaptcha import EzCaptcha\r\n\r\nez = EzCaptcha(client_key=\"yourapiKey\")\r\nsolution = ez.solve({\r\n \"websiteURL\": \"https://www.google.com/recaptcha/api2/demo\",\r\n \"websiteKey\": \"6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-\",\r\n \"type\": \"RecaptchaV2TaskProxyless\",\r\n \"isInvisible\": False,\r\n}, waiting_interval=1, waiting_timeout=90, print_log=True)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "EzCaptcha python sdk",
"version": "1.5",
"project_urls": {
"Homepage": "https://github.com/ez-captcha/ezcaptcha-python"
},
"split_keywords": [
"ezcaptcha",
"python",
"sdk"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1a4695fb05ec5b3c482fd8488b9121960d7280bc932c93b90458d04454a02ad",
"md5": "86813a4d77c36c1df623a0ab0520f64f",
"sha256": "4fd3e0915514a8e7eb2963d65511527574b4e3f63a54d259af1d455c4c7ac33a"
},
"downloads": -1,
"filename": "ezcaptcha-1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86813a4d77c36c1df623a0ab0520f64f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5711,
"upload_time": "2023-12-22T16:19:04",
"upload_time_iso_8601": "2023-12-22T16:19:04.475199Z",
"url": "https://files.pythonhosted.org/packages/d1/a4/695fb05ec5b3c482fd8488b9121960d7280bc932c93b90458d04454a02ad/ezcaptcha-1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-22 16:19:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ez-captcha",
"github_project": "ezcaptcha-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ezcaptcha"
}