Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【验证码问题】使用若快的方式接入验证码识别系统,一直返回“验证码输入错误” #204

Open
TristanXi opened this issue Aug 10, 2018 · 2 comments

Comments

@TristanXi
Copy link

使用自动打码平台,确认已正确识别验证码,但是还会出现“验证码输入错误, 请重新输入!”的提示。调用示例如下:
print ws_api.get_gzh_info('bitewu666',identify_image_callback = rk.identify_image_callback_ruokuai_sogou)

@zhenghailong888
Copy link

使用自动打码平台,确认已正确识别验证码,但是还会出现“验证码输入错误,请重新输入!”的提示。调用示例如下:
print ws_api.get_gzh_info('bitewu666',identify_image_callback = rk.identify_image_callback_ruokuai_sogou)

‘’rk.identify_image_callback_ruokuai_sogou‘’这句的方法是怎么实现,能贴出来给我看看吗?谢谢~

@dengsibao
Copy link

dengsibao commented Jul 29, 2019

源代码有实现的例子

def __identify_image_callback(img, code):
    try:
        username = os.environ['rk_username']
        password = os.environ['rk_password']
        id_ = os.environ['rk_id']
        key = os.environ['rk_key']
        rc = RClient(username, password, id_, key)
        result = rc.rk_create(img, code)
        print('验证码:', result['Result'])
        return result['Result']
    except Exception:
        raise Exception('识别验证码错误')

下面是具体实现

def identify_image_callback_ruokuai_sogou(img):
    return __identify_image_callback(img, 3060)


def identify_image_callback_ruokuai_weixin(img):
    return __identify_image_callback(img, 3040)

最后直接调用就可以:

ws_api.get_gzh_info('bitewu666'identify_image_callback = rk.identify_image_callback_ruokuai_sogou)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants