Created
September 12, 2014 07:57
-
-
Save oczkers/9f4024ae141f9b59b5bd to your computer and use it in GitHub Desktop.
decaptchercom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
gdown.decaptchercom | |
~~~~~~~~~~~~~~~~~~~ | |
This module implements basic api for decaptcher.com. | |
""" | |
import requests | |
class client(object): | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password | |
def decode(self, captcha_img): | |
"""Resolves captcha.""" | |
values = {'function': 'picture2', 'username': self.username, 'password':self.password, 'pict_to': '0', 'pict_type': '0'} | |
files = {'pict': captcha_img} | |
rc = requests.post('http://poster.de-captcher.com/', values, files=files).content.split('|') | |
#0|1246040|1484|0|0|42398666 9022 | |
return {'status': rc[0], 'text': rc[5]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment