Skip to main content

A free/libre interface for solving reCAPTCHA challenges.

Project description

Version 0.3.4

librecaptcha is a free/libre program and library that allows you to solve reCAPTCHA challenges.

This does not automatically solve challenges. It provides an interface through which a human can solve them.

Installation

From PyPI

Install with pip:

sudo pip3 install librecaptcha

To install locally, run without sudo and add the --user option.

From the Git repository

Clone the repository with the following commands (you’ll need to have Git installed):

git clone https://github.com/nickolas360/librecaptcha
cd librecaptcha

Then install with pip:

sudo pip3 install .

Alternatively, you can run:

sudo ./setup.py install

With either command, to install locally, run without sudo and add the --user option.

Run without installing

Run the first set of commands in the previous section to clone the repository. Then, install the required dependencies by running:

sudo pip3 install -r requirements.txt

To install the dependencies locally, run without sudo and add the --user option.

Usage

If you installed librecaptcha, you can simply run librecaptcha. Otherwise, run ./librecaptcha.py. This will show usage information.

To use librecaptcha programmatically, import it:

from librecaptcha import get_token

and then call the get_token() function. Its signature is:

get_token(api_key, site_url, debug=False, user_agent=None)

Parameters:

  • api_key (str): The reCAPTCHA API key to use.

  • site_url (str): The base URL of the site that contains the reCAPTCHA challenge. This should start with http:// or https:// and include the hostname, but nothing else. For example, https://example.com.

  • debug (bool): Whether or not to print debug information.

  • user_agent (str): The user-agent string to use. If not specified, a random one will be used.

Returns (str): A reCAPTCHA token. This should usually be submitted with the form as the value of the g-recaptcha-response field. (Note: These tokens usually expire after a couple of minutes.)

What’s new

Version 0.3.4:

  • Fixed possible encoding issue in setup.py.

Version 0.3.3:

  • librecaptcha can now be installed from PyPI, or from the Git repository with pip or setup.py.

Version 0.2.x:

  • Updated user-agent list.

  • The current reCAPTCHA version is now fetched during initialization and no longer needs to be manually updated.

Dependencies

  • Python ≥ 3.4

  • The following Python packages (the installation instructions above handle installing these):

License

librecaptcha is licensed under the GNU General Public License, version 3 or any later version. See LICENSE.

This README file has been released to the public domain using CC0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

librecaptcha-0.3.4.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

librecaptcha-0.3.4-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file librecaptcha-0.3.4.tar.gz.

File metadata

File hashes

Hashes for librecaptcha-0.3.4.tar.gz
Algorithm Hash digest
SHA256 b7602c75c974e1e843cc9408842ea347a23d452a86500bf889a322b484170e23
MD5 6151987a20f343e21cb721491a853635
BLAKE2b-256 8d58cae6583c54747f235d99b3e64a6330f37bcb9a5ede61b1857d772ce30089

See more details on using hashes here.

File details

Details for the file librecaptcha-0.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for librecaptcha-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1cca40bd6e24c5dab7f924ed0e62591d05c1e70375aafee45c481c8a2b0a2bc4
MD5 06a2620d6c871fe6aae8670f29b4d57f
BLAKE2b-256 138ced78895bfa58672f101d7df8cadde9873517b92da6d36073ae79cd7af20a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page