capmonster.cloud library for Python
Project description
Capmonster.cloud for Python
Capmonster.cloud library for Python3. Currently supporting ImageToText, NoCaptcha (Recaptcha v2) proxyless and proxy-on, Recaptchav3Proxyless, FunCaptcha proxyless and proxy-on, HCaptcha proxyless and proxy-on. ##### At least 2x cheaper, up to 30x faster than manual recognition services.
pip install capmonster_python
IMPORTANT
If you get an CapmonsterException error, please recreate your task and keep going like that.
Use latest version, update your module.
If you are using a version higher than 1.2.1, change imports python_capmonster to this like that:
from capmonster_python import *
Documentation
You can find documentation in here.
Examples
ImageToTextTask
Send image without encode.
from capmonster_python import ImageToTextTask
capmonster = ImageToTextTask(client_key="YOUR CLIENT KEY")
taskId = capmonster.createTask(file_path="captcha.png")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
Send directly image encoded data.
from capmonster_python import ImageToTextTask
capmonster = ImageToTextTask(client_key="YOUR CLIENT KEY")
taskId = capmonster.createTask(base64_image="DATA")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
NoCaptchaTaskProxyless
from capmonster_python import NoCaptchaTaskProxyless
capmonster = NoCaptchaTaskProxyless(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_key="WEBSITE_KEY", website_url="URL")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
NoCaptchaTask
from capmonster_python import NoCaptchaTask
capmonster = NoCaptchaTask(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_key="WEBSITE_KEY", website_url="URL", proxyAddress="8.8.8.8", proxyPort=8080, proxyLogin="login", proxyPassword="password", proxyType="http or https")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
RecaptchaV3TaskProxyless
default minimum score: 0.3 and default page_action: verify
from capmonster_python import RecaptchaV3TaskProxyless
capmonster = RecaptchaV3TaskProxyless(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_key="WEBSITE_KEY", website_url="URL", minimum_score=0.7, page_action="verify")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
FunCaptchaTaskProxyless
default js_subdomain: None and default data_blob: None
from capmonster_python import FunCaptchaTaskProxyless
capmonster = FunCaptchaTaskProxyless(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_url="URL", website_public_key="PUBLIC")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
FunCaptchaTask
default js_subdomain: None and default data_blob: None
from capmonster_python import FunCaptchaTask
capmonster = FunCaptchaTask(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_url="URL", website_public_key="PUBLIC", proxyAddress="8.8.8.8", proxyPort=8080, proxyLogin="login", proxyPassword="password", proxyType="http")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
HCaptchaTaskProxyless
from capmonster_python import HCaptchaTaskProxyless
capmonster = HCaptchaTaskProxyless(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_key="WEBSITE_KEY", website_url="URL")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
HCaptchaTask
from capmonster_python import HCaptchaTask
capmonster = HCaptchaTask(client_key="CLIENT KEY")
taskId = capmonster.createTask(website_key="WEBSITE_KEY", website_url="URL", proxyAddress="8.8.8.8", proxyPort=8080, proxyLogin="login", proxyPassword="password", proxyType="http or https")
response = capmonster.joinTaskResult(taskId=taskId)
print(response)
For detailed documentation (not this library’s) is here: capmonster.cloud documentation
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
File details
Details for the file capmonster_python-1.3.2.tar.gz.
File metadata
- Download URL: capmonster_python-1.3.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d265dd011ec552831f4a0a6a1ba5a9e57a63f3acfcbeddee23b5fb9089fb9e75
|
|
| MD5 |
ae4979d27183b4ee9538d8d5156903a5
|
|
| BLAKE2b-256 |
e3858a58f9a2322db2ba387ec3aa9d9ecf714351990d6a3845ff7293e0c541b6
|