Git Product home page Git Product logo

antigate's Introduction

Real-time captcha-to-text decodings

Build Status https://coveralls.io/repos/gotlium/antigate/badge.png?branch=master Current version on PyPi Downloads from PyPi

Documentation available at Read the Docs.

Installation:

  1. From source:
$ git clone https://github.com/gotlium/antigate.git

$ cd antigate && sudo python setup.py install

OR

$  sudo pip install antigate

Usage:

>>> from antigate import AntiGate
>>> print AntiGate('API-KEY', 'captcha.jpg')

If you wish to complain about a mismatch results, use abuse method.

Example:

>>> from antigate import AntiGate
>>> gate = AntiGate('API-KEY', 'captcha.jpg')
>>> print gate
>>> if str(gate) != 'qwerty':
>>>     gate.abuse()

After all manipulations, you can get your balance:

>>> print gate.balance()

Or get your statistics data:

>>> print gate.stats()

Real time system load info:

>>> print gate.load()

Customizing requests to API

Customize grab-lib preferences:

>>> from antigate import AntiGate
>>> config = {'connect_timeout': 5, 'timeout': 60}
>>> gate = AntiGate('API-KEY', 'captcha.jpg', grab_config=config)
>>> print gate

Additional options for sending Captcha:

>>> from antigate import AntiGate
>>> config = {'min_len': '3', 'max_len': '5', 'phrase': '2'}
>>> gate = AntiGate('API-KEY', 'captcha.jpg', send_config=config)
>>> print gate

Disable auto run and use methods manually:

>>> from antigate import AntiGate
>>> gate = AntiGate('API-KEY', auto_run=False)
>>> captcha_id1 = gate.send('captcha1.jpg')
>>> captcha_id2 = gate.send('captcha2.jpg')
>>> print gate.get(captcha_id1)
>>> print gate.get(captcha_id2)

Get results for multiple ids:

>>> gate = AntiGate('API-KEY', auto_run=False)
>>> captcha_id1 = gate.send('captcha1.jpg')
>>> captcha_id2 = gate.send('captcha2.jpg')
>>> print gate.get_multi([captcha_id1, captcha_id2])

Compatibility:

  • Python: 2.6, 2.7, 3.3
Bitdeli badge

antigate's People

Contributors

gotlium avatar

Stargazers

 avatar

Watchers

 avatar

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.