]> jfr.im git - yt-dlp.git/commitdiff
[extractor/youtube] Fix live chat for videos with content warning
authorcoletdjnz <redacted>
Sun, 12 Jun 2022 05:56:50 +0000 (17:56 +1200)
committercoletdjnz <redacted>
Sun, 12 Jun 2022 05:56:50 +0000 (17:56 +1200)
Fixes #4051
Authored by: coletdjnz

yt_dlp/extractor/youtube.py

index a6fcebf826132aa12efaad623788001a98b02b9c..c3a4f70d956cc31c6a4be0fcdb6c8f776db21ac3 100644 (file)
@@ -3690,7 +3690,8 @@ def process_language(container, base_url, lang_code, sub_name, query):
             pass
         else:
             info.setdefault('subtitles', {})['live_chat'] = [{
-                'url': f'https://www.youtube.com/watch?v={video_id}',  # url is needed to set cookies
+                # url is needed to set cookies
+                'url': f'https://www.youtube.com/watch?v={video_id}&bpctr=9999999999&has_verified=1',
                 'video_id': video_id,
                 'ext': 'json',
                 'protocol': 'youtube_live_chat' if is_live or is_upcoming else 'youtube_live_chat_replay',