- Add
AsyncAnticaptchaClientandAsyncJobfor async/await usage withhttpx(pip install python-anticaptcha[async]) - Rename
base.py→sync_client.pyfor symmetry withasync_client.py; backward-compatiblebase.pyshim preserved - Rename sync example files with
sync_prefix to matchasync_examples - Add context manager support to
AnticaptchaClient(__enter__,__exit__,close) - Add
ANTICAPTCHA_API_KEYenvironment variable fallback forAnticaptchaClient - Add
Proxyfrozen dataclass withparse_url()andto_kwargs()methods - Add snake_case aliases:
create_task,create_task_smee,get_balance,get_app_stats - Add
py.typedmarker and complete type annotations (#124) - Add
__repr__toJob,AnticaptchaClient, andBaseTask(#123) - Add optional
on_checkcallback toJob.join()(#125) ImageToTextTasknow accepts file paths (str/Path), raw bytes, or file-like objects
- Breaking: Minimum Python version increased from 2.7+ to 3.9+
- Migrate from
setup.py/setup.cfgtopyproject.toml(PEP 621) (#122) - Switch README from RST to Markdown (#126)
- Switch test runner from nose2 to pytest
- Switch PyPI publishing to trusted publishing via GitHub Actions (#114)
- Fix
RecaptchaV2EnterpriseTaskmissing proxyless base class inheritance - Fix
ImageToTextTask.serialize()sendingNonevalues - Fix
GeeTestTaskincorrect inheritance - Fix
AntiGateTaskProxylesssuper() call - Remove redundant cookies serialization in
ProxyMixin - Use Python 3
super()without arguments throughout codebase
- Drop Python 2.7 and Python 3.4-3.8 support
- Remove
sixdependency (replaced with stdliburllib.parse) - Remove
compat.pymodule - Remove legacy
setup.pyandsetup.cfg
- Add new tasks:
AntiGateTaskandAntiGateTaskProxylessRecaptchaV2EnterpriseTaskandRecaptchaV2EnterpriseTaskProxylessGeeTestTaskandGeeTestTaskProxylessRecaptchaV2Task(alias ofNoCaptchaTask) andRecaptchaV2TaskProxyless(alias ofNoCaptchaTaskProxyless)
- Add example for
AntiGateTaskProxyless - Add optional parameters
comment,websiteUrltoImageToTextTask - Add optional parameter
funcaptchaApiJSSubdomain,datatoFunCaptchaTask* - Add optional parameter
isEnterprisetoRecaptchaV3Task*
- Drop tasks unsupported upstream:
CustomCaptchaTask,SquareNetTask
- Internal refactor to extract
UserAgentMixin,CookieMixin - Use nose2 for tests
- Added examples for proxy mode including hcaptcha_request_proxy
- Fix inheritance of FunCaptchaTask
- Added FunCaptchaTask to e2e tests
Added parameter recaptchaDataSValue in NoCaptchaTask*
Thanks to this change added support for additional "data-s" used by some custom ReCaptcha deployments, which is in fact a one-time token and must be grabbed every time you want to solve a Recaptcha. <div class="g-recaptcha" data-sitekey="some sitekey" data-s="THIS_TOKEN"></div>
- Fixed deprecated method report_incorrect. You should currently use report_incorrect_image instead already.
- Added custom timeout for
createTaskSmee. Use asclient.createTaskSmee(task, timeout=5*60). Default timeout is 5 minutes. - Added
squarenet_validatorfor usage with thread pool for concurrent execution
- Default 5 seconds timeout apply to all API request.
- Fix import of package
- Added
HCaptchaTaskProxylessandHCaptchaTaskfor support hCaptcha . Seeexamples/hcaptcha_request.pyfor detailed usage example. - Added
SquareNetTask. Seeexamples/squarenet.pyfor detailed usage example. - Added
Job.report_incorrect_recaptchaandJob.report_incorrect_image.
- Exposed
FunCaptchaProxylessTaskaspython_anticaptcha.FunCaptchaProxylessTask - Exposed
CustomCaptchaTaskaspython_anticaptcha.CustomCaptchaTask - Formated code via Black
- Move constant monitoring to GitHub Actions
- Deprecated
Job.report_incorrect. Usereport_incorrect_imageinstead.
- Added example
remote_image.py
- Switch CI from TravisCI to GitHub Actions
- Automate PyPI releases
- Use
use_scm_versionfor versioning - Drop
use_2to3insetup.py
- Added
python_anticaptcha.__version__to provide version signature (see PEP396)
python_anticaptcha.AnticaptchaClient.createTaskSmeeuse shared session & keep connection.
- Added
python_anticaptcha.AnticaptchaClient.createTaskSmeeto receive responses without polling - The method, which is based on the callback result of captcha / task factory to Smee.io, which immediately transfers it to library. Allows to significantly shorten the waiting time for a response and to reduce load the network connection. The method is in beta and the way it works may change. All comments are welcome.
- Added
- Recaptcha V3 is now officially supported by Anti-Captcha. Added
python_anticaptcha.RecaptchaV3TaskProxyless.
- Added support for
IsInvisibleflag inNoCaptchaTaskProxylessTaskandNoCaptchaTask
- Replaced
python_anticaptcha.AnticatpchaExceptiontopython_anticaptcha.AnticaptchaExceptiondue typo
- Added
python_anticaptcha.exceptions.AnticatpchaException - Added docs about error handling
- Deprecated
python_anticaptcha.exceptions.AnticatpchaException