diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-08-05 23:29:41 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-08-05 23:29:41 +0300 |
commit | f0f76a33dc0e5a3f495a05293b1db4ceab5c3029 (patch) | |
tree | 82a7b2135aa42d34094ed13ffdd5400f0f6c9ccb | |
parent | 88a68db03e616fc8e6d2684ffbfadeb64dd93cfb (diff) | |
download | hypervideo-pre-f0f76a33dc0e5a3f495a05293b1db4ceab5c3029.tar.lz hypervideo-pre-f0f76a33dc0e5a3f495a05293b1db4ceab5c3029.tar.xz hypervideo-pre-f0f76a33dc0e5a3f495a05293b1db4ceab5c3029.zip |
fix premiere live chat
They have isLiveContent = false so just check if the live chat renderer
continuation exists
-rw-r--r-- | youtube_dl/extractor/youtube.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index feb80f7f4..d6c35fab4 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2001,13 +2001,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor): is_live = bool_or_none(video_details.get('isLive')) has_live_chat_replay = False - is_live_content = bool_or_none(video_details.get('isLiveContent')) - if not is_live and is_live_content: + if not is_live: yt_initial_data = self._get_yt_initial_data(video_id, video_webpage) try: yt_initial_data['contents']['twoColumnWatchNextResults']['conversationBar']['liveChatRenderer']['continuations'][0]['reloadContinuationData']['continuation'] has_live_chat_replay = True - except (KeyError, IndexError): + except (KeyError, IndexError, TypeError): pass # Check for "rental" videos |