antigate.com/anti-captcha.com的简易包装
antigate的Python项目详细描述
文本编码的实时验证码图片:https://api.travis-ci.org/gotlium/antigate.png?branch=master
:alt:build status
:target:https://travis ci.org/gotlium/antigate
。图片::https://coveralls.io/repos/gotlium/antigate/badge.png?branch=master
:目标:https://coveralls.io/r/gotlium/antigate?分支=主
…图片::https://img.shields.io/badge/python-2.6,2.7,3.3,3.4,3.5-blue.svg
:alt:python 2.6、2.7、3.3、3.4、3.5
:目标:https://pypi.python.org/pypi/antigate/
。图片::https://img.shields.io/pypi/v/antigate.svg
:alt:pypi上的当前版本
:目标:https://pypi.python.org/pypi/antigate/
…图片::https://img.shields.io/pypi/dm/antigate.svg
:alt:downloads from pypi
:目标:https://pypi.python.org/pypi/antigate/
…图片::https://img.shields.io/badge/license-gplv2-green.svg
:目标:https://pypi.python.org/pypi/antigate/
:alt:license
`.
安装
----
代码块::bash
$git clone https://github.com/gotlium/antigate.git
$cd antigate&;python setup.py install
代码块::bash
$pip install antigate
**要求:**
您可以使用grab/requests/urllib作为http后端。
`grab'安装:
……代码块::bash
`requests`安装:
…代码块::bash
`urllib`默认使用。
----
代码块::python
>;>gate=antigate('api-key')anticaptcha('api-key')
>;>captcha_id=gate.send('captcha.jpg')
>;>print gate.get(captcha_id)
如果您希望投诉不匹配的结果,请使用"滥用"方法:
。代码块::python
>;>;来自antigate import antigate
>;>;gate=antigate('api-key','captcha.jpg')
>;>;如果str(gate)!='qwerty':
>;>>gate.usage()
代码块::python
>;>print gate.balance()
代码块::python
>;>print gate.stats()
系统加载信息:
…代码块::python
>;>;print gate.load()
api的自定义请求代码块::python
>;>;来自antigate import antigate
>;>;config={'connect_timeout':5,'timeout':60}
>;>;gate=antigate('api-key','captcha.jpg',grab_config=config)
>;print gate
验证码:
…代码块::python
>;>;来自antigate import antigate
>;>;config={'min_len':'3','max_len':'5','phrase':'2}
>;>;gate=antigate('api-key','captcha.jpg',send_config=config)
>;>;打印门
手动使用所有方法:
…代码块::python
>;>;来自antigate import antigate
>;>;gate=antigate('api-key')
>;>;captcha_id1=gate.send('captcha1.jpg')
>;>;captcha_id2=gate.send('captcha2.jpg')
>;>;>;打印门。获取(验证码ID 1)
>;>;打印门。获取(验证码ID 2)
获取多个ID的结果:
……代码块::python
>;>;gate=antigate('api-key')
>;>;captcha_id1=gate.send('captcha1.jpg')
>;>;captcha_id2=gate.send('captcha2.jpg')
>;>;print gate.get_multi([captcha_id1,如果您想使用字节或base64,请使用captcha_id2])
。代码块::python
gate=antigate('api-key')
base64
>;>;captcha\u id=gate.send(b64encode(fp.read())
或stream
>;>;captcha\u id=gate.send(fp.read())
>;打印门。获取(验证码ID)
API文档
----
https://anti-captcha.com/apidoc/http://anti gate.com/?action=api algo
兼容性
----
*python:2.6、2.7、3.3、3.4、3.5
图片::https://d2weczhvl823v0.cloudfront.net/gotlium/antigate/trend.png
:alt:bitdeli badge
:target:https://bitdeli.com/free
:alt:build status
:target:https://travis ci.org/gotlium/antigate
。图片::https://coveralls.io/repos/gotlium/antigate/badge.png?branch=master
:目标:https://coveralls.io/r/gotlium/antigate?分支=主
…图片::https://img.shields.io/badge/python-2.6,2.7,3.3,3.4,3.5-blue.svg
:alt:python 2.6、2.7、3.3、3.4、3.5
:目标:https://pypi.python.org/pypi/antigate/
。图片::https://img.shields.io/pypi/v/antigate.svg
:alt:pypi上的当前版本
:目标:https://pypi.python.org/pypi/antigate/
…图片::https://img.shields.io/pypi/dm/antigate.svg
:alt:downloads from pypi
:目标:https://pypi.python.org/pypi/antigate/
…图片::https://img.shields.io/badge/license-gplv2-green.svg
:目标:https://pypi.python.org/pypi/antigate/
:alt:license
`.
安装
----
代码块::bash
$git clone https://github.com/gotlium/antigate.git
$cd antigate&;python setup.py install
代码块::bash
$pip install antigate
**要求:**
您可以使用grab/requests/urllib作为http后端。
`grab'安装:
……代码块::bash
`requests`安装:
…代码块::bash
`urllib`默认使用。
----
代码块::python
>;>gate=antigate('api-key')anticaptcha('api-key')
>;>captcha_id=gate.send('captcha.jpg')
>;>print gate.get(captcha_id)
如果您希望投诉不匹配的结果,请使用"滥用"方法:
。代码块::python
>;>;来自antigate import antigate
>;>;gate=antigate('api-key','captcha.jpg')
>;>;如果str(gate)!='qwerty':
>;>>gate.usage()
代码块::python
>;>print gate.balance()
代码块::python
>;>print gate.stats()
系统加载信息:
…代码块::python
>;>;print gate.load()
api的自定义请求代码块::python
>;>;来自antigate import antigate
>;>;config={'connect_timeout':5,'timeout':60}
>;>;gate=antigate('api-key','captcha.jpg',grab_config=config)
>;print gate
验证码:
…代码块::python
>;>;来自antigate import antigate
>;>;config={'min_len':'3','max_len':'5','phrase':'2}
>;>;gate=antigate('api-key','captcha.jpg',send_config=config)
>;>;打印门
手动使用所有方法:
…代码块::python
>;>;来自antigate import antigate
>;>;gate=antigate('api-key')
>;>;captcha_id1=gate.send('captcha1.jpg')
>;>;captcha_id2=gate.send('captcha2.jpg')
>;>;>;打印门。获取(验证码ID 1)
>;>;打印门。获取(验证码ID 2)
获取多个ID的结果:
……代码块::python
>;>;gate=antigate('api-key')
>;>;captcha_id1=gate.send('captcha1.jpg')
>;>;captcha_id2=gate.send('captcha2.jpg')
>;>;print gate.get_multi([captcha_id1,如果您想使用字节或base64,请使用captcha_id2])
。代码块::python
gate=antigate('api-key')
base64
>;>;captcha\u id=gate.send(b64encode(fp.read())
或stream
>;>;captcha\u id=gate.send(fp.read())
>;打印门。获取(验证码ID)
API文档
----
https://anti-captcha.com/apidoc/http://anti gate.com/?action=api algo
兼容性
----
*python:2.6、2.7、3.3、3.4、3.5
图片::https://d2weczhvl823v0.cloudfront.net/gotlium/antigate/trend.png
:alt:bitdeli badge
:target:https://bitdeli.com/free