Saltar a contenido

botcity.plugins.captcha.plugin.BotAntiCaptchaPlugin

__init__(self, api_key) special

BotAntiCaptchaPlugin.

Parameters:

Name Type Description Default
api_key str

Api_key found in your AntiCaptcha account.

required

auth(self, api_key)

Updates the api_key for this object. This method does NOT need to be used if you have provided the correct key in this class' constructor.

Parameters:

Name Type Description Default
api_key str

AntiCaptcha's key that allow you to use it's API Service.

required

Returns:

Type Description
BotAntiCaptchaPlugin

self (allows method chaining).

report(self)

Allows you to report the last solved captcha in case it was incorrect, and get refunded.

Returns:

Type Description
BotAntiCaptchaPlugin

self, allowing method chaining

solve_fun(self, url, site_key, timeout=120)

Solves a FunCaptcha.

Parameters:

Name Type Description Default
url str

URL of the page where the captcha is located.

required
site_key str

iFrame ID of the captcha.

required
timeout int

Maximum amount of time in seconds to wait until the captcha is solved.

120

Returns:

Type Description
str

The captcha's solution.

solve_re(self, url, site_key, timeout=120)

Solves a ReCaptcha.

Parameters:

Name Type Description Default
url str

URL of the page where the captcha is located.

required
site_key str

iFrame ID of the captcha.

required
timeout int

Maximum amount of time in seconds to wait until the captcha is solved.

120

Returns:

Type Description
str

The captcha's solution.

solve_text(self, img_or_path, timeout=120)

Solves a Text Captcha.

Parameters:

Name Type Description Default
img_or_path Any[str, Image.Image]

Either an Image or a path to an image file

required
timeout int

Maximum amount of time in seconds to wait until the captcha is solved.

120

Returns:

Type Description
str

The captcha's solution, which is a text or a few letters.

botcity.plugins.captcha.plugin.BotDeathByCaptchaPlugin

__init__(self, username, password) special

Provides an easy way to solve captcha's using Death By Captcha's API.

Parameters:

Name Type Description Default
username str

Your Death By Captcha login.

required
password str

Your Death By Captcha password.

required

auth(self, username, password)

Updates the username and password for this object. This method does NOT need to be used if you have provided the correct login/password in this class' constructor.

Parameters:

Name Type Description Default
username str

Your Death By Captcha username.

required
password str

Your Death By Captcha password.

required

Returns:

Type Description
BotDeathByCaptchaPlugin

self (allows method chaining)

report(self)

Allows you to report the last solved captcha in case it was incorrect, and get refunded.

Returns:

Type Description
BotDeathByCaptchaPlugin

self (allows method chaining)

solve(self, img_or_path, timeout=120)

Solves a captcha of any supported type.

Parameters:

Name Type Description Default
img_or_path Any[str, Image.Image]

Either an Image object or a path to an image file.

required
timeout int

Maximum amount of time in seconds to wait until the captcha is solved.

120

Returns:

Type Description
str

The captcha's solution, which is a text or a few letters.