From f598a5da05285bd79156688e6938b957590c310d Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 31 Dec 2019 15:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index ccf1064..b99df5c 100644 --- a/api.py +++ b/api.py @@ -51,6 +51,8 @@ class XiGuaLiveApi: Init Function :param name: class:str|User: 主播名 """ + if name is None: + name = "永恒de草薙" if type(name) == User: self.roomLiver = name self.name = name.name @@ -199,7 +201,7 @@ class XiGuaLiveApi: 获取用户信息 :return: """ - if self.roomLiver is None and not self._forceSearchUser(): + if self.roomLiver is None: return False _formatData = {"COMMON": COMMON_GET_PARAM, "TIMESTAMP": time.time() * 1000, "userId": self.roomLiver.ID} _url = USER_INFO_API.format_map(_formatData).format_map(_formatData)