Skip to content

Getting Started

After you installed this package, the next step is to import the package into your code and start using the functions.

# For Anti Captcha, use:
from botcity.plugins.captcha import BotAntiCaptchaPlugin

# For Death By Captcha, use:
from botcity.plugins.captcha import BotDeathByCaptchaPlugin

As a demonstration of the library, let's build a simple example together that will do something cool .

Step 1 of Example

To make the example we will...

# Instantiate the plugin (AntiCaptcha)
antiCaptcha = BotAntiCaptchaPlugin(API_KEY)

# Death By Captcha version
deathByCaptcha = BotDeathByCaptchaPlugin(USERNAME, PASSWORD)


Step 2 of Example

# AntiCaptcha

# Death By Captcha


Complete code

Let's take a look into the complete code:

# Imports
from botcity.plugins.captcha import BotAntiCaptchaPlugin
from botcity.plugins.captcha import BotDeathByCaptchaPlugin

# AntiCaptcha Text
anti_captcha = BotAntiCaptchaPlugin("API_KEY")

# AntiCaptcha ReCaptcha
url = ''
captcha_id = '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-'
print(anti_captcha.solve_re(url, captcha_id))

# Death By Captcha
death_by_captcha = BotDeathByCaptchaPlugin("USERNAME", "PASSWORD")

Pro Tip

This plugin allows you to use method chaining where applicable (methods auth and report):

# Let's suppose the API solves the captcha incorrectly
incorrect_captcha = True

# Tries again
if incorrect_captcha:"captcha.jpg")

Next Steps

Check our examples and experiment with the API. Let us know where it can be improved.

Have fun automating!

Back to top