From bb5fa72f508236c91c297db75257300820861b16 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 9 Jan 2020 09:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api.py b/api.py index e9c5d7d..94d8309 100644 --- a/api.py +++ b/api.py @@ -254,6 +254,7 @@ class XiGuaLiveApi: print("搜索接口请求失败") return False self.broadcaster = None + self.isValidUser = False if "data" in d and d["data"] is not None: for i in d["data"]: if self.broadcaster is not None: @@ -276,6 +277,7 @@ class XiGuaLiveApi: :return: """ if self.broadcaster is None: + self.isValidUser = False return False _formatData = {"COMMON": COMMON_GET_PARAM, "TIMESTAMP": time.time() * 1000, "userId": self.broadcaster.ID} _url = USER_INFO_API.format_map(_formatData).format_map(_formatData) @@ -304,6 +306,7 @@ class XiGuaLiveApi: def _getRoomInfo(self, force=False): if self.roomID == 0: + self.isLive = False return False if not force or (self._updRoomAt + timedelta(minutes=2) > datetime.now()): return self.isLive