This commit is contained in:
Jerry Yan 2020-01-10 20:06:47 +08:00
parent 39318a4cc9
commit 11843661c0

2
api.py
View File

@ -203,7 +203,7 @@ class XiGuaLiveApi:
if self.roomID == 0:
self.isLive = False
return False
if not force or (self._updRoomAt + timedelta(minutes=2) > datetime.now()):
if (self._updRoomAt + timedelta(minutes=2) > datetime.now()) or not force:
return self.isLive
_formatData = {"COMMON": COMMON_GET_PARAM, "TIMESTAMP": time.time() * 1000, "roomId": self.roomID}
_url = ROOM_INFO_API.format_map(_formatData).format_map(_formatData)