mirror of https://github.com/testerSunshine/12306
修正下载验证码失败问题
parent
4c5c036286
commit
ec88dffe4f
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue