Skip to content

Commit

Permalink
update show qrcode server
Browse files Browse the repository at this point in the history
  • Loading branch information
lemisky committed Jan 21, 2024
1 parent 6daed6f commit e2d529d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/aligo/core/Auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ def _login_by_qrcode(self) -> requests.Response:
return response
else:
self.log.warning('未知错误 可能二维码已经过期')
if self._webServer:
self._webServer.shutdown()
self.raise_error_log(response)
time.sleep(3)
self._login_timeout.check_timeout()
Expand Down
22 changes: 10 additions & 12 deletions src/aligo/core/LoginServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@ def do_GET(self):
self.send_header("content-type", "text/html")
self.end_headers()
self.wfile.write(bytes(
f"""
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>登录阿里云盘</title>
</head>
<body>
<p align="center"><img src="/login.png"></p>
</body>
</html>
""", 'utf8'
))
f"""<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>扫码登录阿里云盘</title>
</head>
<body>
<p align="center"><img src="/login.png"></p>
</body>
</html>""", 'utf8'))
elif self.path == '/login.png':
self.send_response(200)
self.send_header("content-type", "image/png")
Expand Down

0 comments on commit e2d529d

Please sign in to comment.