修正下载验证码失败问题

pull/29/head
wenxianping 2018-01-25 21:39:19 +08:00
parent 4c5c036286
commit ec88dffe4f
1 changed files with 25 additions and 22 deletions

View File

@ -45,6 +45,9 @@ class GoLogin:
codeimgUrl = code_url
img_path = './tkcode'
result = self.httpClint.send(codeimgUrl, is_logger=False)
if "message" in result:
print("验证码下载失败,正在重试")
else:
try:
open(img_path, 'wb').write(result)
if self.is_aotu_code: