Skip to main content

Bestcaptchasolver python2 API library

Project description

BestCaptchaSolver.com python2 API wrapper

bestcaptchasolver-python2 is a super easy to use bypass captcha python2 API wrapper for bestcaptchasolver.com captcha service

Installation

git clone https://github.com/bestcaptchasolver/bestcaptchasolver-python2

Dependencies

pip install requests

Usage

# make sure you've changed access_key, page_url, etc in main.py
python main.py  

How to use?

Simply require the module, set the auth details and start using the captcha service:

from bestcaptchasolverapi2 import BestCaptchaSolverAPI

Set access_token for authentication

access_token = 'access_token_here'
# get your access token from https://bestcaptchasolver.com/account
bcs = BestCaptchaSolverAPI(ACCESS_TOKEN)

Once you've set your authentication details, you can start using the API

Get balance

balance = bcs.account_balance()                 

Solve image captcha

data = {}
data['image'] = 'captcha.jpg'

# optional parameters
data['is_case'] = if case sensitive set to True, default: False
data['is_phrase'] = if phrase, set to True, default: False
data['is_math'] = True if captcha is math, default: False
data['alphanumeric'] = 1 (digits only) or 2 (letters only), default: all characters
data['minlength'] = minimum length of captcha text, default: any
data['maxlength'] = maximum length of captcha text, default: any

bcs.submit_image_captcha(data)

The image submission works with both files and b64 encoded strings. For setting the affiliate_id, set the affiliate_id parameter

Submit recaptcha details

For recaptcha submission there are two things that are required.

  • page_url
  • site_key
  • type (optional)
  • v3_action (optional)
  • v3_min_score (optional)
  • user_agent (optional)
  • affiliate_id (optional)
  • proxy (optional)
captcha_id = bcs.submit_recaptcha({'page_url': 'page_url_here', 'site_key': 'sitekey_here')   

This method returns a captchaID. This ID will be used next, to retrieve the g-response, once workers have completed the captcha. This takes somewhere between 10-80 seconds.

Geetest

  • domain
  • gt
  • challenge
captcha_id = bcs.submit_geetest({'domain': 'DOMAIN_HERE', 'gt': 'GT_HERE', 'challenge': 'CHALLENGE_HERE'})

Use captcha_id to retrieve solution for geetest

Capy

  • page_url
  • site_key
captcha_id = bcs.submit_capy({'page_url': 'PAGE_URL_HERE', 'site_key': 'SITEKEY_HERE'})

Use captcha_id to retrieve solution for capy

Retrieve captcha response (all captchas)

image_text = bcs.retrieve(captcha_id)['text']
gresponse = bcs.retrieve(recaptcha_id)['gresponse']
solution = bcs.retrieve(recaptcha_id)['solution']

If submitted with proxy, get proxy status

proxy_status = bcs.retrieve(recaptcha_id)['proxy_status']

Set captcha bad

When a captcha was solved wrong by our workers, you can notify the server with it's ID, so we know something went wrong.

bcs.set_captcha_bad(captcha_id)

Examples

Check main.py

License

API library is licensed under the MIT License

More information

More details about the server-side API can be found here

captcha, bypasscaptcha, decaptcher, decaptcha, 2captcha, deathbycaptcha, anticaptcha, bypassrecaptchav2, bypassnocaptcharecaptcha, bypassinvisiblerecaptcha, captchaservicesforrecaptchav2, recaptchav2captchasolver, googlerecaptchasolver, recaptchasolverpython, recaptchabypassscript, bestcaptchasolver

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

bestcaptchasolverapi2-0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

bestcaptchasolverapi2-0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file bestcaptchasolverapi2-0.2.tar.gz.

File metadata

  • Download URL: bestcaptchasolverapi2-0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/2.7.16

File hashes

Hashes for bestcaptchasolverapi2-0.2.tar.gz
Algorithm Hash digest
SHA256 2ec480f3514dfb082898174a1c136bc2e0b5c728253b48ade1ac6cbb77f5fe75
MD5 1c81e5080052e397f6e8b2751d343209
BLAKE2b-256 2c1de5dbd471e7f9f6de6abeed8b1ec68249d00ffcf2d82b4362fd9e53557136

See more details on using hashes here.

File details

Details for the file bestcaptchasolverapi2-0.2-py3-none-any.whl.

File metadata

  • Download URL: bestcaptchasolverapi2-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/2.7.16

File hashes

Hashes for bestcaptchasolverapi2-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c7d1cd60fce524bbf02898ef6dbc01458751707b937b440d81fc935cafdc1e8
MD5 319dd3123e0854873436ff84693272fc
BLAKE2b-256 f84fcb3da7194a1db775c6e8088e6fe028f36cd6120292ee3584db6201e57dd8

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