You've already forked XiguaLiveDanmakuHelper
抽奖信息可从弹幕中提取,可实时检测抽奖避免刷屏
This commit is contained in:
12
api.py
12
api.py
@ -189,20 +189,22 @@ class XiGuaLiveApi:
|
||||
self.onLike(User(i))
|
||||
else:
|
||||
pass
|
||||
self.lottery = Lottery(i)
|
||||
self._updRoomCount += 1
|
||||
if self.lottery is not None:
|
||||
if self.lottery is not None or self.lottery.ID != 0:
|
||||
self.lottery.update()
|
||||
if self.lottery.isFinished:
|
||||
self.onLottery(self.lottery)
|
||||
self.lottery = None
|
||||
if self._updRoomCount > 120 or len(d['data']) == 0:
|
||||
if self.lottery.isFinished:
|
||||
self.onLottery(self.lottery)
|
||||
self.lottery = None
|
||||
self.updRoomInfo()
|
||||
self._updRoomCount = 0
|
||||
return
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
name = "永恒de草薙"
|
||||
# name = "永恒de草薙"
|
||||
name = "尤美"
|
||||
if len(sys.argv) > 2:
|
||||
if sys.argv[-1] == "d":
|
||||
DEBUG = True
|
||||
|
Reference in New Issue
Block a user