You've already forked XiguaLiveDanmakuHelper
灵活下播判断
This commit is contained in:
2
api.py
2
api.py
@ -176,6 +176,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)
|
||||
@ -199,6 +200,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
|
||||
|
Reference in New Issue
Block a user