Giter Site home page Giter Site logo

andreidrang / python-cptch.net Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 60 KB

Python library for Cptch.net.

Home Page: https://pythoncaptcha.xyz

License: GNU General Public License v3.0

Python 100.00%
python36 python3-library cptch cptchnet captcha recaptcha api-client api security aiohttp

python-cptch.net's Introduction

python-cptchnet

PyPI version Build Status Maintainability Codacy Badge

Библиотека предназначена для разрабаотчиков ПО и служит для облегчения работы с API сервиса Cptch.net.

Присутствуют примеры работы с библиотекой.

Используется Python версии 3.6+.

How to install? Как установить?

pip

pip install python-cptchnet

Source

git https://github.com/AndreiDrang/python-cptch.net.git
cd python-cptch.net
python setup.py install

По всем вопросам можете писать в Telegram чат.


Последние обновления

v.0.1 - Добавлены методы: ImageCaptcha, ReCaptchaV2.


Реализованы следующие методы:

1.Решение капчи-изображения.

Краткий пример:

from python_cptchnet import ImageCaptcha
# Введите ключ от сервиса Cptch.net, из своего аккаунта
SERVICE_KEY = ""
# Ссылка на изображения для расшифровки
image_link = ""
# Возвращается JSON содержащий информацию для решения капчи
user_answer = ImageCaptcha.ImageCaptcha(service_key=SERVICE_KEY).captcha_handler(captcha_link=image_link)

if not user_answer['error']:
	# решение капчи
	print(user_answer['captchaSolve'])
	print(user_answer['taskId'])
elif user_answer['error']:
	# Тело ошибки, если есть
	print(user_answer['errorBody']['text'])
	print(user_answer['errorBody']['id'])

2.Решение ReCaptcha v2.

Краткий пример:

from python_cptchnet import ReCaptchaV2
# Введите ключ от сервиса Cptch.net, из своего аккаунта
SERVICE_KEY = ""
# G-ReCaptcha ключ сайта
SITE_KEY = ""
# Ссылка на страницу с капчёй
PAGE_URL = ""
# Возвращается JSON содержащий информацию для решения капчи
user_answer = ReCaptchaV2.ReCaptchaV2(service_key=SERVICE_KEY).captcha_handler(site_key=SITE_KEY,
                                                                               page_url=PAGE_URL)

if not user_answer['error']:
	# решение капчи
	print(user_answer['captchaSolve'])
	print(user_answer['taskId'])
elif user_answer['error']:
	# Тело ошибки, если есть
	print(user_answer['errorBody']['text'])
	print(user_answer['errorBody']['id'])

Кроме того, для тестирования различных типов капчи предоставляется специальный сайт, на котором собраны все имеющиеся типы капчи, с удобной системой тестирования ваших скриптов.


Errors table

Error ID Ошибка
-1 Внутренняя ошибка (в соединении и т.п.), не относится к сервису Cptch.net
Error ID in.php Cptch.net код ошибки
10 ERROR_WRONG_USER_KEY
11 ERROR_KEY_DOES_NOT_EXIST
12 ERROR_ZERO_BALANCE
13 ERROR_PAGEURL
14 ERROR_NO_SLOT_AVAILABLE
15 ERROR_ZERO_CAPTCHA_FILESIZE
16 ERROR_TOO_BIG_CAPTCHA_FILESIZE
17 ERROR_WRONG_FILE_EXTENSION
18 ERROR_IMAGE_TYPE_NOT_SUPPORTED
19 ERROR_UPLOAD
20 ERROR_IP_NOT_ALLOWED
21 IP_BANNED
22 ERROR_BAD_TOKEN_OR_PAGEURL
23 ERROR_GOOGLEKEY
24 ERROR_CAPTCHAIMAGE_BLOCKED
25 MAX_USER_TURN
Error ID res.php Cptch.net код ошибки
30 CAPCHA_NOT_READY
31 ERROR_CAPTCHA_UNSOLVABLE
32 ERROR_WRONG_ID_FORMAT
33 ERROR_WRONG_CAPTCHA_ID
34 ERROR_BAD_DUPLICATES
35 REPORT_NOT_RECORDED
Error ID NNNN Cptch.net код ошибки
40 ERROR: 1001
41 ERROR: 1002
42 ERROR: 1003
43 ERROR: 1004
44 ERROR: 1005

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.