# python3-aioanticaptcha
[![PyPI version](https://badge.fury.io/py/python3-aioanticaptcha.svg)](https://badge.fury.io/py/python3-anticaptcha)
[![Python versions](https://img.shields.io/pypi/pyversions/python3-aioanticaptcha.svg?logo=python&logoColor=FBE072)](https://badge.fury.io/py/python3-anticaptcha)
Python library forked from [anticaptchaofficial](https://github.com/AdminAnticaptcha/anticaptcha-python).
The main purpose of the fork was to add implementation for async request using [aiohttp](https://docs.aiohttp.org/en/stable/)
## How to install?
```bash
pip install python3-aioanticaptcha
```
### Source
```bash
git clone https://github.com/andrersp/aioanticaptcha
python setup.py install
```
___
Example how to create [Recaptcha V2](https://anti-captcha.com/apidoc/task-types/RecaptchaV2TaskProxyless) task and receive g-response:
```python
import asyncio
from aioanticaptcha.recaptchav2proxyless import *
async def main():
async with recaptchaV2Proxyless() as solver:
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
# only for V2-invisible Recaptcha! :
# solver.set_is_invisible(1)
g_response = solver.solve_and_return_solution()
if g_response != 0:
print("g-response: " + g_response)
else:
print("task finished with error " + solver.error_code)
if __name__ == "__main__":
asyncio.run(main())
```
Report previosly solved Recaptcha V2/V3/Enterprise as incorrect:
```python
...
solver.report_incorrect_recaptcha()
```
Report it as correct to improve your quality:
```python
...
solver.report_correct_recaptcha()
```
---
Solve [image captcha](https://anti-captcha.com/apidoc/task-types/ImageToTextTask):
```python
import asyncio
from aioanticaptcha.imagecaptcha import *
async def main():
async with imagecaptcha() as solver:
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
captcha_text = await solver.solve_and_return_solution("captcha.jpeg")
if captcha_text != 0:
print("captcha text " + captcha_text)
else:
print("task finished with error " + solver.error_code)
if __name__ == "__main__":
asyncio.run(main())
```
Report previosly solved image captcha as incorrect:
```python
...
solver.report_incorrect_image_captcha()
```
---
Solve [Funcaptcha](https://anti-captcha.com/apidoc/task-types/FunCaptchaTaskProxyless) (Arkoselabs):
```python
import asyncio
from aioanticaptcha.funcaptchaproxyless import *
async def main():
async with funcaptchaProxyless() as solver:
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX")
token = solver.solve_and_return_solution()
if token != 0:
print("result token: " + token)
else:
print("task finished with error " + solver.error_code)
if __name__ == "__main__":
asyncio.run(main())
```
___
Solve [GeeTest](https://anti-captcha.com/apidoc/task-types/GeeTestTask) captcha:
```python
import asyncio
from aioanticaptcha.geetestproxyless import *
async def main():
async with geetestProxyless() as solver:
solver.set_verbose(1)
solver.set_key("YOUR_API_KEY")
solver.set_website_url("https://address.com")
solver.set_gt_key("CONSTANT_GT_KEY")
solver.set_challenge_key("VARIABLE_CHALLENGE_KEY")
token = solver.solve_and_return_solution()
if token != 0:
print("result tokens: ")
print(token)
else:
print("task finished with error " + solver.error_code)
if __name__ == "__main__":
asyncio.run(main())
```
___
Solve [HCaptcha](https://anti-captcha.com/apidoc/task-types/HCaptchaTask):
```python
from aioanticaptcha.hcaptchaproxyless import *
import asyncio
async def main():
async with hCaptchaProxyless() as solver:
solver.set_verbose(1)
solver.set_key("YOUR_KEY")
solver.set_website_url("https://website.com")
solver.set_website_key("SITE_KEY")
g_response = solver.solve_and_return_solution()
if g_response != 0:
print("g-response: " + g_response)
else:
print("task finished with error " + solver.error_code)
if __name__ == "__main__":
asyncio.run(main())
```
___
Check out [examples](https://github.com/andrersp/aioanticaptcha) for other captcha types
License
[MIT](https://choosealicense.com/licenses/mit/)
Raw data
{
"_id": null,
"home_page": "https://github.com/andrersp/aioanticaptcha",
"name": "python3-aioanticaptcha",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,anti-captcha,async",
"author": "Andr\u00e9 Fran\u00e7a",
"author_email": "rsp.assistencia@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/dd/96/d664121d1da4f6caf3ca9c41841b5436084622079c2eae2dd54d0bd0c97b/python3-aioanticaptcha-1.2.tar.gz",
"platform": null,
"description": "# python3-aioanticaptcha\n\n\n[![PyPI version](https://badge.fury.io/py/python3-aioanticaptcha.svg)](https://badge.fury.io/py/python3-anticaptcha)\n[![Python versions](https://img.shields.io/pypi/pyversions/python3-aioanticaptcha.svg?logo=python&logoColor=FBE072)](https://badge.fury.io/py/python3-anticaptcha)\n\nPython library forked from [anticaptchaofficial](https://github.com/AdminAnticaptcha/anticaptcha-python).\n\n\nThe main purpose of the fork was to add implementation for async request using [aiohttp](https://docs.aiohttp.org/en/stable/)\n\n## How to install?\n\n```bash\npip install python3-aioanticaptcha\n```\n\n### Source\n```bash\ngit clone https://github.com/andrersp/aioanticaptcha\npython setup.py install\n```\n___\n\n \n\nExample how to create [Recaptcha V2](https://anti-captcha.com/apidoc/task-types/RecaptchaV2TaskProxyless) task and receive g-response:\n\n```python\nimport asyncio\nfrom aioanticaptcha.recaptchav2proxyless import *\n\n\nasync def main():\n\n async with recaptchaV2Proxyless() as solver:\n solver.set_verbose(1)\n solver.set_key(\"YOUR_KEY\")\n solver.set_website_url(\"https://website.com\")\n solver.set_website_key(\"SITE_KEY\")\n\n # only for V2-invisible Recaptcha! :\n # solver.set_is_invisible(1)\n\n g_response = solver.solve_and_return_solution()\n if g_response != 0:\n print(\"g-response: \" + g_response)\n else:\n print(\"task finished with error \" + solver.error_code)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\nReport previosly solved Recaptcha V2/V3/Enterprise as incorrect:\n```python\n...\nsolver.report_incorrect_recaptcha()\n```\n\nReport it as correct to improve your quality:\n```python\n...\nsolver.report_correct_recaptcha()\n```\n---\n \n\nSolve [image captcha](https://anti-captcha.com/apidoc/task-types/ImageToTextTask):\n\n```python\nimport asyncio\nfrom aioanticaptcha.imagecaptcha import *\n\n\nasync def main():\n async with imagecaptcha() as solver:\n solver.set_verbose(1)\n solver.set_key(\"YOUR_KEY\")\n captcha_text = await solver.solve_and_return_solution(\"captcha.jpeg\")\n if captcha_text != 0:\n print(\"captcha text \" + captcha_text)\n else:\n print(\"task finished with error \" + solver.error_code)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\nReport previosly solved image captcha as incorrect:\n```python\n...\nsolver.report_incorrect_image_captcha()\n```\n\n---\n\n \n\nSolve [Funcaptcha](https://anti-captcha.com/apidoc/task-types/FunCaptchaTaskProxyless) (Arkoselabs):\n\n```python\nimport asyncio\nfrom aioanticaptcha.funcaptchaproxyless import *\n\n\nasync def main():\n async with funcaptchaProxyless() as solver:\n solver.set_verbose(1)\n solver.set_key(\"YOUR_KEY\")\n solver.set_website_url(\"https://website.com\")\n solver.set_website_key(\"XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX\")\n\n token = solver.solve_and_return_solution()\n if token != 0:\n print(\"result token: \" + token)\n else:\n print(\"task finished with error \" + solver.error_code)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n___\n\n \n\nSolve [GeeTest](https://anti-captcha.com/apidoc/task-types/GeeTestTask) captcha:\n\n```python\nimport asyncio\nfrom aioanticaptcha.geetestproxyless import *\n\n\nasync def main():\n async with geetestProxyless() as solver:\n solver.set_verbose(1)\n solver.set_key(\"YOUR_API_KEY\")\n solver.set_website_url(\"https://address.com\")\n solver.set_gt_key(\"CONSTANT_GT_KEY\")\n solver.set_challenge_key(\"VARIABLE_CHALLENGE_KEY\")\n token = solver.solve_and_return_solution()\n if token != 0:\n print(\"result tokens: \")\n print(token)\n else:\n print(\"task finished with error \" + solver.error_code)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n___\n\n \n\nSolve [HCaptcha](https://anti-captcha.com/apidoc/task-types/HCaptchaTask):\n\n```python\nfrom aioanticaptcha.hcaptchaproxyless import *\nimport asyncio\n\n\nasync def main():\n async with hCaptchaProxyless() as solver:\n solver.set_verbose(1)\n solver.set_key(\"YOUR_KEY\")\n solver.set_website_url(\"https://website.com\")\n solver.set_website_key(\"SITE_KEY\")\n\n g_response = solver.solve_and_return_solution()\n if g_response != 0:\n print(\"g-response: \" + g_response)\n else:\n print(\"task finished with error \" + solver.error_code)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n___\n\nCheck out [examples](https://github.com/andrersp/aioanticaptcha) for other captcha types\n\nLicense\n[MIT](https://choosealicense.com/licenses/mit/)\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Async lib for Anti-Captcha service.",
"version": "1.2",
"split_keywords": [
"python",
"anti-captcha",
"async"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7e9318049d6605f58781501e7e2f778e42df0652ca27e76d97e7439cea6f5a07",
"md5": "67d1b7faa7647db37eb9aa01f056a6a5",
"sha256": "a2f3d4aa7ddd2b2d8b8e1d7b9b08db0ef5056e3c2f130b2b6dd37e5e4ab3e57d"
},
"downloads": -1,
"filename": "python3_aioanticaptcha-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "67d1b7faa7647db37eb9aa01f056a6a5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14755,
"upload_time": "2023-01-22T00:28:02",
"upload_time_iso_8601": "2023-01-22T00:28:02.342032Z",
"url": "https://files.pythonhosted.org/packages/7e/93/18049d6605f58781501e7e2f778e42df0652ca27e76d97e7439cea6f5a07/python3_aioanticaptcha-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dd96d664121d1da4f6caf3ca9c41841b5436084622079c2eae2dd54d0bd0c97b",
"md5": "cc6984e8739c6e5dc0a4d5cff1fc7634",
"sha256": "42c3c90829037af30e744531f409702beec3fc79158c1185a38df49352782298"
},
"downloads": -1,
"filename": "python3-aioanticaptcha-1.2.tar.gz",
"has_sig": false,
"md5_digest": "cc6984e8739c6e5dc0a4d5cff1fc7634",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8008,
"upload_time": "2023-01-22T00:28:04",
"upload_time_iso_8601": "2023-01-22T00:28:04.750179Z",
"url": "https://files.pythonhosted.org/packages/dd/96/d664121d1da4f6caf3ca9c41841b5436084622079c2eae2dd54d0bd0c97b/python3-aioanticaptcha-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-22 00:28:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "andrersp",
"github_project": "aioanticaptcha",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "python3-aioanticaptcha"
}