¶
botcity.plugins.captcha.BotAntiCaptchaPlugin
¶
__init__(api_key)
¶
BotAntiCaptchaPlugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
Api_key found in your AntiCaptcha account. |
required |
auth(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()
¶
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(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(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(img_or_path, timeout=120)
¶
Solves a Text Captcha.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img_or_path
|
Any[str, 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.BotDeathByCaptchaPlugin
¶
__init__(username, password)
¶
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(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()
¶
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(img_or_path, timeout=120)
¶
Solves a captcha of any supported type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
img_or_path
|
Any[str, 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. |