YesCaptcha SDK for Python
Project description
yescaptcha-python
This is SDK for YesCaptcha.
Installation
pip3 install yescaptcha
Usage
Below are some simple exmaples for Recaptcha, Image2Text:
NoCaptchaTaskProxyless
from yescaptcha.task import NoCaptchaTaskProxyless
from yescaptcha.client import Client
CLIENT_KEY = <YOUR_CLIENT_KEY>
website_url = 'https://www.google.com/recaptcha/api2/demo'
website_key = '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-'
client = Client(client_key=CLIENT_KEY, debug=True)
task = NoCaptchaTaskProxyless(website_key=website_key, website_url=website_url)
job = client.create_task(task)
print('result', job.get_solution())
ImageToText
from utils import resize_base64_image_from_file # see examples/utils.py
from yescaptcha.task import ImageToTextTask
from yescaptcha.client import Client
CLIENT_KEY = <YOUR_CLIENT_KEY>
IMAGE_PATH = <IMAGE_PATH>
client = Client(client_key=CLIENT_KEY)
task = ImageToTextTask(resize_base64_image_from_file(IMAGE_PATH))
job = client.create_task(task)
print('result', job.get_solution_text())
Please check http://yescaptcha.readthedocs.org to get more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yescaptcha-0.0.1.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for yescaptcha-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e9c99dbe00f3ae18f3cab4290a6f58104f3edac28297ce72ae76cc1fe24d95 |
|
MD5 | 0591cea193339a2e5708fd90621ee89f |
|
BLAKE2b-256 | 53cbb994354b904ab1976fc2928de8ce9df5529c51a67f4d1d7335db580d4c7d |