Skip to main content
## Installation

Use command:

```shell
pip install -e git://github.com/lorien/decaptcher#egg=decaptcher
```

## Usage

### Twocaptcha Backend Example

Service website is https://2captcha.com?from=3019071

```python
from decaptcher import Service

solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process_file('captcha.png'))
# or
with open('captcha.png') as inp:
print(solver.process(inp.read()))
# or
with open('captcha.png') as inp:
print(solver.process(inp))
# You can pass extra parameters (described in 2captcha documentation)
# using task_options arguments:
print(solver.process_file('captcha.png', task_options={
'regsense': 1,
'min_len': 4,
}))

```

### Solving custom captcha type using 2captcha.com

Decaptcher library supports any custom captcha supported by 2captcha.com service.
Just use `task_options` argument to pass all required parameters.
For example, to solve text captcha do:
```python
from decaptcher import Service

solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process(task_options={
'lang': 'en',
'textcaptcha': 'Name of first day of week',
}))
```

### Getting captcha ID along the solution

To get catpcha ID pass `verbose=True` to `process` method:

```python
solver = Service('twocaptcha', api_key='2captcha.com API HERE')
print(solver.process_file('captcha.png', verbose=True))
````

You get result like:
```python
{"task_id": "captcha ID", "result": "captcha text"}
```


### Rucaptcha Backend Example

Service website is https://rucaptcha.com?from=3019071

```python
from decaptcher import Service

solver = Service('rucaptcha', api_key='RUCAPTCHA_KEY')
print(solver.process_file('captcha.png'))
```


### Antigate Backend Example

Service website is http://getcaptchasolution.com/ijykrofoxz

```python
from decaptcher import Service

solver = Service('antigate', api_key='ANTIGATE_KEY')
print(solver.process_file('captcha.png'))
```


### Browser Backend Example

Browser backend just displays captcha in default browser and wait you enter solution in console.

```python
from decaptcher import Service

solver = Service('browser')
print(solver.process_file('captcha.png'))
```

Metadata

Release files for decaptcher 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for decaptcher 0.0.3
File Size Uploaded Provenance Actions
decaptcher-0.0.3.tar.gz 4.9 kB Without provenance Details for decaptcher-0.0.3.tar.gz

Release files / decaptcher-0.0.3.tar.gz

Download URL decaptcher-0.0.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0780c1fa6843f0423c4cb25a22f14f152212e40bfbbf7028bdc6ddc1925d68bb
BLAKE2b-256 checksum
How to use checksums
38ce003767d861c2a3bd32a2c0668bd55c1d3f361bccf972d480c7b6495cd6a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Security for decaptcher 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page