toloka.client.collectors.Captcha | Source code

Captcha(
self,
*,
uuid: Optional[UUID] = None,
history_size: Optional[int] = None
)


Collects captcha statistics for every Toloker.

Captcha provides an advanced protection against robots. It is used with conditions:

The collector can be used with actions:

## Parameters Description

Parameters Type Description
uuid Optional[UUID]

The ID of a collector. Note that when you clone a pool, both pools start using the same collector, because it is not cloned. Usually, it is not an intended behavior. For example, in this case one collector gathers history size from both pools.

history_size Optional[int]

The maximum number of recent captchas used to calculate the statistics. If history_size is omitted, all captchas are counted.

Examples:

The example shows how to block Toloker's access to the project for 15 days if they solve 60% of captchas or less. The rule is applied after entering at least 3 captchas.

new_pool = toloka.pool.Pool(....)