예제 #1
0
 def getcaptcha():
     while True:
         try:
             data = get_captcha_image(
                 LOGIN_SESSION, LOGIN_URL_MAPPING["normal"]["captcha"])
             break
         except ResponseCodeError:
             Log.v("获取验证码信息失败,重试获取验证码中...")
             continue
     img_binary = base64.b64decode(data["image"])
     return img_binary
예제 #2
0
 def getcaptcha():
     data = get_captcha_image(LOGIN_SESSION,
                              LOGIN_URL_MAPPING["other"]["captcha"])
     img_binary = base64.b64decode(data["image"]).encode()
     return img_binary