Esempio n. 1
0
def checkcode():
    img = s.get(codeurl, stream=True, headers=headers)
    with open('checkcode.gif', 'wb') as f:
        f.write(img.content)
    code = recognizer.recognize_checkcode('/home/fty/new-system/checkcode.gif')
    # print(code)
    return code
Esempio n. 2
0
def checkcode():
    img=s.get(codeurl, stream=True, headers=headers)
    with open('checkcode.gif','wb') as f:
        f.write(img.content)
    trainner.update_model() 
    code = recognizer.recognize_checkcode('checkcode.gif')
    #print(code)
    return code
Esempio n. 3
0
def get_captcha():
    image = r.get(aspx_url, headers=header)
    with open('CheakCode.png', 'wb') as f:
        f.write(image.content)
    image = Image.open("CheakCode.png")
    image.show()
    code = recognizer.recognize_checkcode('CheakCode.png')
    print(code)
    checkcode = input("请输入验证码")
    return checkcode
Esempio n. 4
0
def identify():
    code = recognizer.recognize_checkcode('./checkcode.png')
    print(code)