Giter Club home page Giter Club logo

bypasscaptcha's Introduction

imagetyperz-api-python2 - Imagetyperz API wrapper

imagetyperzapi2 is a super easy to use bypass captcha API wrapper for imagetyperz.com captcha service

Installation

pip install imagetyperzapi2

or

git clone https://github.com/imagetyperz-api/imagetyperz-api-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 imagetyperzapi2 import ImageTyperzAPI

Set access_token or username and password (legacy) for authentication

access_token = 'access_token_here'
# get access token from: http://www.imagetyperz.com/Forms/ClientHome.aspx
ita = ImageTyperzAPI(access_token)      # init imagetyperz api obj
# legacy way, will get deprecated at some point
#ita.set_user_password('your_username', 'your_password')

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

Get balance

balance = ita.account_balance()                       # get account balance
print 'Balance: {}'.format(balance)                 # print balance

Submit image captcha

ita.solve_captcha('captcha.jpg', case_sensitive=False)

Works with both files and URLs

ita.solve_captcha('http://abc.com/your_captcha.jpg')   

Submit recaptcha details

For recaptcha submission there are two things that are required.

  • page_url
  • site_key
captcha_id = ita.submit_recaptcha(page_url, sitekey)        # submit captcha first, to get ID

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.

Retrieve captcha response

Once you have the captchaID, you check for it's progress, and later on retrieve the gresponse.

The in_progress() method will tell you if captcha is still being decoded by workers. Once it's no longer in progress, you can retrieve the gresponse with retrieve_recaptcha(captcha_id)

# check if it's still in progress (waiting to be solved), every 10 seconds
print 'Waiting for recaptcha to be solved ...'
while ita.in_progress():    # while it's still in progress
	sleep(10)               # sleep for 10 seconds and recheck

recaptcha_response = ita.retrieve_recaptcha(captcha_id)           # captcha_id is optional, if not given, will use last captcha id submited
print 'Recaptcha response: {}'.format(recaptcha_response)         # print google response

Other methods/variables

Affiliate id

The constructor accepts a 2nd parameter, as the affiliate id.

ita = ImageTyperzAPI(access_token, 123)     # 123 is the affid

Requests timeout

As a 3rd parameter in the constructor, you can specify a timeout for the requests (in seconds)

ita = ImageTyperzAPI(access_token, 123, 60)  # sets timeout to 60 seconds

Submit recaptcha with proxy

When a proxy is submitted with the recaptcha details, the workers will complete the captcha using the provided proxy/IP.

captcha_id = ita.submit_recaptcha(page_url, sitekey, '12.34.56.78:1234')    # ip:port

Proxy with authentication is also supported

captcha_id = ita.submit_recaptcha(page_url, sitekey, '12.34.56.78:1234:user:password')

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.

print ita.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

bypasscaptcha's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.