File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,8 @@ def check_availability(self):
268
268
elif status == 'ERROR' :
269
269
if reason == 'Video unavailable' :
270
270
raise exceptions .VideoUnavailable (video_id = self .video_id )
271
+ elif status == 'LIVE_STREAM' :
272
+ raise exceptions .LiveStreamError (video_id = self .video_id )
271
273
272
274
@property
273
275
def vid_info (self ):
Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ def playability_status(watch_html: str) -> (str, str):
134
134
"""
135
135
player_response = initial_player_response (watch_html )
136
136
status_dict = player_response .get ('playabilityStatus' , {})
137
+ if 'liveStreamability' in status_dict :
138
+ return 'LIVE_STREAM' , 'Video is a live stream.'
137
139
if 'status' in status_dict :
138
140
if 'reason' in status_dict :
139
141
return status_dict ['status' ], [status_dict ['reason' ]]
You can’t perform that action at this time.
0 commit comments