Skip to content

Commit

Permalink
fix bug and optimize code in nonebot-plugin-ncm
Browse files Browse the repository at this point in the history
  • Loading branch information
kitUIN committed Oct 15, 2024
1 parent ed37f43 commit 6fb084b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nonebot-plugin-ncm/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def login(self) -> bool:
return False

def get_user_info(self) -> str:
message: str = f"欢迎您网易云用户:{GetCurrentSession().nickname} [{GetCurrentSession().uid}]";
message: str = f"欢迎您网易云用户:{GetCurrentSession().nickname} [{GetCurrentSession().uid}]"
logger.success(message)
self.save_user(DumpSessionAsString(GetCurrentSession()))
return message
Expand Down Expand Up @@ -113,9 +113,7 @@ def get_qrcode(self):
while True:
rsp = self.api.login.LoginQrcodeCheck(uuid) # 检测扫描状态
if rsp["code"] == 803 or rsp["code"] == 800:
st = self.api.login.GetCurrentLoginStatus()
logger.debug(st)
self.api.login.WriteLoginInfo(st)
self.api.login.WriteLoginInfo(self.api.login.GetCurrentLoginStatus())
self.get_user_info()
return True
time.sleep(1)
Expand Down

0 comments on commit 6fb084b

Please sign in to comment.