We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
二维码登录.py
1 parent 19a7ea4 commit 7567b64Copy full SHA for 7567b64
demos/二维码登录.py
@@ -11,6 +11,7 @@ def login():
11
LoginQrcodeUnikey,
12
LoginQrcodeCheck,
13
)
14
+ from pyncm import GetCurrentSession, DumpSessionAsString, LoadSessionFromString
15
16
uuid = LoginQrcodeUnikey()["unikey"] # 获取 UUID
17
print("UUID", uuid)
@@ -28,6 +29,10 @@ def login():
28
29
# 登录成功
30
print(f"{rsp['code']} -- {rsp['message']}", "...")
31
WriteLoginInfo(GetCurrentLoginStatus())
32
+ print("[!] 登录态 Session:", DumpSessionAsString(GetCurrentSession()))
33
+ print(
34
+ '[-] 此后可通过 SetCurrentSession(LoadSessionFromString("PYNCMe...")) 恢复当前登录态'
35
+ )
36
return True
37
time.sleep(1)
38
0 commit comments