ad-m / python-anticaptcha

Client library for solve captchas with Anticaptcha.com support.

Home Page:http://python-anticaptcha.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-anticaptcha

image

Python package

Join the chat at https://gitter.im/python-anticaptcha/Lobby

Python compatibility

Client library for solve captchas with Anticaptcha.com support. The library supports both Python 2.7 and Python 3.

The library is cyclically and automatically tested for proper operation. We are constantly making the best efforts for its effective operation.

In case of any problems with integration - read the documentation, create an issue, use Gitter or contact privately.

Getting Started

Install as standard Python package using:

pip install python-anticaptcha

Usage

To use this library do you need Anticaptcha.com API key.

Solve recaptcha

Example snippet for Recaptcha:

The full integration example is available in file examples/recaptcha.py.

If you only process few page many times to increase reliability, you can specify whether the captcha is visible or not. This parameter is not required, as is the system detects invisible sitekeys automatically, and needs several recursive measures for automated training and analysis. For provide that pass is_invisible parameter to NoCaptchaTaskProxylessTask or NoCaptchaTask eg.:

Solve text captcha

Example snippet for text captcha:

Solve funcaptcha

Example snippet for funcaptcha:

Report incorrect image

Example snippet for reporting an incorrect image task:

Setup proxy

The library is not responsible for managing the proxy server. However, we point to the possibility of simply launching such a server by:

pip install mitmproxy
mitmweb -p 9190 -b 0.0.0.0 --ignore '.' --socks

Next to in your application use something like:

We recommend entering IP-based access control for incoming addresses to proxy. IP address required by Anticaptcha.com is:

69.65.41.21
209.212.146.168

Error handling

In the event of an application error, the AnticaptchaException exception is thrown. To handle the exception, do the following:

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Adam Dobrawy - Initial work - ad-m

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Client library for solve captchas with Anticaptcha.com support.

http://python-anticaptcha.readthedocs.io/en/latest/

License:MIT License


Languages

Language:Python 96.3%Language:Makefile 3.7%