mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-02 05:07:55 +01:00
fix premiere live chat
They have isLiveContent = false so just check if the live chat renderer continuation exists
This commit is contained in:
parent
b8eff9125a
commit
17d14e05f7
@ -2002,13 +2002,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
is_live = bool_or_none(video_details.get('isLive'))
|
is_live = bool_or_none(video_details.get('isLive'))
|
||||||
|
|
||||||
has_live_chat_replay = False
|
has_live_chat_replay = False
|
||||||
is_live_content = bool_or_none(video_details.get('isLiveContent'))
|
if not is_live:
|
||||||
if not is_live and is_live_content:
|
|
||||||
yt_initial_data = self._get_yt_initial_data(video_id, video_webpage)
|
yt_initial_data = self._get_yt_initial_data(video_id, video_webpage)
|
||||||
try:
|
try:
|
||||||
yt_initial_data['contents']['twoColumnWatchNextResults']['conversationBar']['liveChatRenderer']['continuations'][0]['reloadContinuationData']['continuation']
|
yt_initial_data['contents']['twoColumnWatchNextResults']['conversationBar']['liveChatRenderer']['continuations'][0]['reloadContinuationData']['continuation']
|
||||||
has_live_chat_replay = True
|
has_live_chat_replay = True
|
||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Check for "rental" videos
|
# Check for "rental" videos
|
||||||
|
Loading…
Reference in New Issue
Block a user