避免下到别人的直播了

This commit is contained in:
Jerry Yan 2019-04-14 15:37:13 +08:00 committed by JerryYan
parent 6c02b965b0
commit 2a51593cc3

5
api.py
View File

@ -161,9 +161,12 @@ class XiGuaLiveApi:
if "room" not in d and d["room"] is None:
self.apiChangedError("Api发生改变请及时联系我", d)
return False
self.roomLiver = User(d)
if self.name not in str(self.roomLiver):
self.isLive = False
return False
self._rawRoomInfo = d["room"]
self.isLive = d["room"]["status"] == 2
self.roomLiver = User(d)
self.roomTitle = d["room"]["title"]
self.roomPopularity = d["room"]["user_count"]
l = Lottery(d)