Skip to content

Commit

Permalink
optimization: 优化验证码识别结果,加快获取速度 (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ckend authored Jan 5, 2021
1 parent e68b04d commit c9bb9bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion easytrader/grid_strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def _get_clipboard_data(self) -> str:
file_path
) # 保存验证码

captcha_num = captcha_recognize(file_path) # 识别验证码
captcha_num = captcha_recognize(file_path).strip() # 识别验证码
captcha_num = "".join(captcha_num.split())
logger.info("captcha result-->" + captcha_num)
if len(captcha_num) == 4:
self._trader.app.top_window().window(
Expand Down

0 comments on commit c9bb9bc

Please sign in to comment.