capsolver python libary
Project description
Capsolver
Capsolver official python library
Supported CAPTCHA types:
- reCAPTCHA v2
- reCAPTCHA v3
- reCAPTCHA Enterprise
- hCaptcha
- hCaptcha Enterprise
- FunCAPTCHA
- AWS WAF CAPTCHA
- Text-based CAPTCHA
Installation
You don't need this source code unless you want to modify the package. If you just want to use the package, just run:
pip install --upgrade capsolver
Install from source with:
python setup.py install
Usage
export CAPSOLVER_API_KEY='...'
Or set capsolver.api_key
to its value:
from pathlib import Path
import os
import base64
import capsolver
# tokenTask
print("api host",capsolver.api_base)
print("api key",capsolver.api_key)
# capsolver.api_key = "..."
solution = capsolver.TokenTask.solve(
type = "RecaptchaV2TaskProxyLess",
websiteKey= "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
websiteURL= "https://www.google.com/recaptcha/api2/demo",
enterprisePayload = {
"s":"123"
}
)
print(solution)
# RecognitionTask
img_path = os.path.join(Path(__file__).resolve().parent,"queue-it.jpg")
with open(img_path,'rb') as f:
solution = capsolver.RecognitionTask.solve(
type="ImageToTextTask",
module="queueit",
body = base64.b64encode(f.read()).decode("utf8")
)
print(solution)
# get current balance
balance = capsolver.Balance.get()
# print the current balance
print(balance)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for capsolver-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94b13e3e4ccc9cad74622dcd7327519e6519e223a2deb532c10aacedb85e8a99 |
|
MD5 | 5103c02d38c23bd34885dda0a2764909 |
|
BLAKE2b-256 | 290638c139105212d2a096a6b1d9ca0b77759b381140d48695806bc7c3b6f9c2 |