Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nextcaptcha-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nextcaptcha-python

NextCaptcha Captcha Solving Service Api Wrapper for Python to solving recaptcha v2, v3,recapthcha moible,hcaptcha,funcaptcha

  • 1.0.8
  • PyPI
  • Socket score

Maintainers
1

NextCaptcha Python SDK

NextCaptcha is a powerful captcha solving service that supports various types of captchas including reCAPTCHA v2, reCAPTCHA v2 Enterprise, reCAPTCHA v3, reCAPTCHA Mobile, hCaptcha, and FunCaptcha. With NextCaptcha, you can easily solve a variety of captcha challenges in your automation scripts and programs.

This SDK provides a simple and easy-to-use Python interface for interacting with the NextCaptcha API. It supports all available captcha types and offers intuitive methods for solving different types of captchas.

Installation

You can install the NextCaptcha Python SDK using pip:

pip install nextcaptcha-python

Usage

To start using the NextCaptcha Python SDK, you first need to obtain your API key (clientKey) from the NextCaptcha Dashboard. Then, you can create a NextCaptchaAPI instance:

from nextcaptcha import NextCaptchaAPI

api = NextCaptchaAPI(client_key="YOUR_CLIENT_KEY")

Now, you can use the api object to solve various types of captchas. To solve reCAPTCHA v2 challenges, use the recaptchav2 method:

result = api.recaptchav2(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA v2 Enterprise To solve reCAPTCHA v2 Enterprise challenges, use the recaptchav2enterprise method:

result = api.recaptchav2enterprise(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA v3 To solve reCAPTCHA v3 challenges, use the recaptchav3 method:

result = api.recaptchav3(website_url="https://example.com", website_key="SITE_KEY")

Solving reCAPTCHA Mobile To solve reCAPTCHA Mobile challenges, use the recaptcha_mobile method:

result = api.recaptcha_mobile(app_key="APP_KEY")

Solving hCaptcha To solve hCaptcha challenges, use the hcaptcha method:

result = api.hcaptcha(website_url="https://example.com", website_key="SITE_KEY")

Solving hCaptcha Enterprise To solve hCaptcha Enterprise challenges, use the hcaptcha_enterprise method:

result = api.hcaptcha_enterprise(website_url="https://example.com", website_key="SITE_KEY")

Solving FunCaptcha To solve FunCaptcha challenges, use the funcaptcha method:

result = api.funcaptcha(website_public_key="WEBSITE_PUBLIC_KEY")

Checking Account Balance To check your NextCaptcha account balance, use the get_balance method:

balance = api.get_balance()
print(f"Account balance: {balance}")

Here is a complete example of using the NextCaptcha Python SDK to solve a reCAPTCHA v2 challenge:

from nextcaptcha import NextCaptchaAPI

CLIENT_KEY = "YOUR_CLIENT_KEY"
WEBSITE_URL = "https://example.com"
WEBSITE_KEY = "SITE_KEY"

api = NextCaptchaAPI(client_key=CLIENT_KEY)
result = api.recaptchav2(website_url=WEBSITE_URL, website_key=WEBSITE_KEY)

if result["status"] == "ready":
    print(f"reCAPTCHA solved: {result['solution']}")
else:
    print(f"Failed to solve reCAPTCHA: {result['error']}")

Error Handling

If an error occurs while solving a captcha, the SDK will return a dictionary containing the error information. You can check the status field to determine if the request was successful. If the status is "ready", the captcha has been successfully solved and the solution will be provided in the solution field. If the status is "failed", the error field will contain a description of the error.

Contributing

If you find any bugs or have suggestions for improvement, please feel free to submit an issue or send a pull request. We welcome all contributions!

License

This project is licensed under the MIT License. For more information, please see the LICENSE file.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc