This commit is contained in:
Jerry Yan 2019-05-17 21:20:25 +08:00 committed by JerryYan
parent 708218d34a
commit b4559f6771
3 changed files with 4 additions and 5 deletions

View File

@ -257,9 +257,9 @@ def appendError(obj):
class downloader(XiGuaLiveApi):
playlist = None
def updRoomInfo(self):
def _updateRoomOnly(self):
global broadcaster, isBroadcasting, updateTime, forceNotBroadcasting, forceNotDownload
super(downloader, self).updRoomInfo()
super(downloader, self)._updateRoomOnly()
updateTime = datetime.strftime(datetime.now(), dt_format)
broadcaster = self.roomLiver
isBroadcasting = self.isLive
@ -276,6 +276,7 @@ class downloader(XiGuaLiveApi):
if "stream_url" in self._rawRoomInfo:
if self.playlist is None:
self.playlist = None
streamUrl = None
else:
self.playlist = self._rawRoomInfo["stream_url"]["flv_pull_url"]
self.playlist = self.playlist.replace("_uhd", "").replace("_sd", "").replace("_ld", "")

View File

@ -191,7 +191,6 @@ if __name__ == "__main__":
resetColor()
time.sleep(60)
api.updRoomInfo()
sys.exit()
print("进入", api.roomLiver, "的直播间")
os.system("title {}".format(api.getTitle()))
print("=" * 30)

3
api.py
View File

@ -145,8 +145,7 @@ class XiGuaLiveApi:
"""
if self.name is None or self.roomLiver is None:
return False
if self.name in self.roomLiver:
return True
return True
def _forceSearchUser(self):
"""