Skip to content

Commit

Permalink
🖨登录二维码改用控制台输出 #495
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnserf-Seed committed Aug 7, 2023
1 parent d3d06ea commit a5e8fa9
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions Util/Login.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,25 @@ def show_qrcode(self, qrcode_url) -> None:
qrcode_url (str): 登录二维码链接
"""

# 创建QR码图像
qr_code_img = Util.qrcode.make(qrcode_url)
# # 创建QR码图像
# qr_code_img = Util.qrcode.make(qrcode_url)

# 显示QR码图像
qr_code_img.show()
# # 显示QR码图像
# qr_code_img.show()

Util.console.print("[ 登录 ]:请扫描弹出的登录二维码。\r")
Util.log.info("[ 登录 ]:请扫描弹出的登录二维码。")
qr = Util.qrcode.QRCode()

# 添加数据
qr.add_data(qrcode_url)

# 生成二维码
qr.make(fit=True)

# 在控制台以 ASCII 形式打印二维码
qr.print_ascii(invert=True)

Util.console.print("[ 登录 ]:请扫描登录二维码。\r")
Util.log.info("[ 登录 ]:请扫描登录二维码。")


def log_and_print(self, status):
Expand Down

1 comment on commit a5e8fa9

@jacknt0086
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出现的二维码用抖音扫是没反应的,怎么回事呢?

Please sign in to comment.