You've already forked XiguaLiveDanmakuHelper
Compare commits
5 Commits
v0.2-beta
...
v0.2-beta.
Author | SHA1 | Date | |
---|---|---|---|
89edd10dc2 | |||
ebe01566c0 | |||
a0f76eb00b | |||
f81c2811ce | |||
c12d8cf4bb |
6
api.py
6
api.py
@ -189,9 +189,10 @@ class XiGuaLiveApi:
|
||||
self.onLike(User(i))
|
||||
else:
|
||||
pass
|
||||
if self.lottery is None or self.lottery.ID == 0:
|
||||
self.lottery = Lottery(i)
|
||||
self._updRoomCount += 1
|
||||
if self.lottery is not None or self.lottery.ID != 0:
|
||||
if self.lottery is not None and self.lottery.ID != 0:
|
||||
self.lottery.update()
|
||||
if self.lottery.isFinished:
|
||||
self.onLottery(self.lottery)
|
||||
@ -203,8 +204,7 @@ class XiGuaLiveApi:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# name = "永恒de草薙"
|
||||
name = "尤美"
|
||||
name = "永恒de草薙"
|
||||
if len(sys.argv) > 2:
|
||||
if sys.argv[-1] == "d":
|
||||
DEBUG = True
|
||||
|
@ -23,6 +23,7 @@ class downloader(XiGuaLiveApi):
|
||||
self.updPlayList()
|
||||
|
||||
def updPlayList(self):
|
||||
if self.isLive:
|
||||
if "stream_url" not in self._rawRoomInfo:
|
||||
if self.playlist is None:
|
||||
self.apiChangedError("无法获取直播链接")
|
||||
@ -30,6 +31,8 @@ class downloader(XiGuaLiveApi):
|
||||
else:
|
||||
self.playlist = self._rawRoomInfo["stream_url"]["alternate_pull_url"]
|
||||
self.playlist = self.playlist.replace("_uhd","").replace("_sd","").replace("_ld","")
|
||||
else:
|
||||
print("未开播,等待开播")
|
||||
|
||||
def onLike(self, user):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user