xenova / chat-downloader

A simple tool used to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!
https://chat-downloader.readthedocs.io/
MIT License
936 stars 131 forks source link

[BUG] YouTube URL parsing error #242

Open 08jingles opened 7 months ago

08jingles commented 7 months ago

Basic information

Describe the bug

If I input 'https://www.youtube.com/channel/{channel_id}/live' instead of directly inputting 'https://www.youtube.com/watch?v={video_id}' in URL, if the channel has two live stream windows, it will prioritize resolving to the non-live streaming room rather than the one currently streaming. However, on the web interface or using yt-dlp, it will correctly prioritize resolving to the streaming room that is currently live.

Command/Code used

chat_downloader --logging debug https://www.youtube.com/channel/UCfipDDn7wY-C-SoUChgxCQQ/live

If running from the command line, provide the following:

  1. The command used (including the verbose tag, -v):
    chat_downloader --logging debug https://www.youtube.com/channel/UCfipDDn7wY-C-SoUChgxCQQ/live
  2. Output from the above command:
    [DEBUG] Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
    [DEBUG] Program version: 0.2.7
    [DEBUG] Initialisation parameters: {'headers': None, 'cookies': None, 'proxy': None}
    [DEBUG] Created YouTubeChatDownloader session.
    [INFO] Site: youtube.com
    [DEBUG] Program parameters: {'url': 'https://www.youtube.com/channel/UCfipDDn7wY-C-SoUChgxCQQ/live', 'start_time': None, 'end_time': None, 'max_attempts': 15, 'retry_timeout': None, 'interruptible_retry': True, 'timeout': None, 'inactivity_timeout': None, 'max_messages': None, 'message_groups': ['messages'], 'message_types': None, 'output': None, 'overwrite': True, 'sort_keys': True, 'indent': 4, 'format': 'youtube', 'format_file': None, 'chat_type': 'live', 'ignore': None, 'message_receive_timeout': 0.1, 'buffer_size': 4096}
    [DEBUG] Match found: "<re.Match object; span=(0, 56), match='https://www.youtube.com/channel/UCfipDDn7wY-C-SoU>". Running "_get_chat_by_user" function in "YouTubeChatDownloader".
    [DEBUG] Chat information: {'chat': <generator object YouTubeChatDownloader._get_chat_messages_by_user_args at 0x000001B1D0B33B50>, 'title': 'UCfipDDn7wY-C-SoUChgxCQQ', 'duration': None, 'status': None, 'video_type': None, 'start_time': None, 'id': 'UCfipDDn7wY-C-SoUChgxCQQ', '_output_writer': None, '_output_callback': None, 'format': <function ChatDownloader.get_chat.<locals>.<lambda> at 0x000001B1D0B7F490>, 'site': <chat_downloader.sites.youtube.YouTubeChatDownloader object at 0x000001B1D0BA1090>}
    [INFO] Retrieving chat for "UCfipDDn7wY-C-SoUChgxCQQ".
    [DEBUG] Starting new HTTPS connection (1): www.youtube.com:443
    [DEBUG] https://www.youtube.com:443 "GET /channel/UCfipDDn7wY-C-SoUChgxCQQ/streams HTTP/1.1" 200 None
    [DEBUG] https://www.youtube.com:443 "GET /watch?v=PfOWDSVJqwU HTTP/1.1" 200 None
    [INFO] Found a livestream: "超フリーチャット~超町民掲示板~【葉山舞鈴/にじさんじ】" (PfOWDSVJqwU).
    [DEBUG] Getting Live chat (Live chat).
    [DEBUG] https://www.youtube.com:443 "GET /live_chat?continuation=0ofMyANuGl5DaWtxSndvWVZVTm1hWEJFUkc0M2Qxa3RReTFUYjFWRGFHZDRRMUZSRWd0UVprOVhSRk5XU25GM1ZSb1Q2cWpkdVFFTkNndFFaazlYUkZOV1NuRjNWU0FCTUFBJTNEMAGCAQYIARgBIACoAQE%3D HTTP/1.1" 200 None
    [DEBUG] Continuation parameters: {'click_tracking': {'clickTrackingParams': 'IhMI87DHrNHihAMV6lEPAh0/qggU'}, 'continuation': '0ofMyANuGl5DaWtxSndvWVZVTm1hWEJFUkc0M2Qxa3RReTFUYjFWRGFHZDRRMUZSRWd0UVprOVhSRk5XU25GM1ZSb1Q2cWpkdVFFTkNndFFaazlYUkZOV1NuRjNWU0FCTUFBJTNEMAGCAQYIARgBIACoAQE%3D'}
    [DEBUG] Session headers: User-Agent, Accept-Language, origin, x-youtube-client-name, x-youtube-client-version, x-origin, x-goog-authuser, x-goog-visitor-id, content-type, referer
    [DEBUG] Logged-in info: {'key': 'logged_in', 'value': '0'}
    [DEBUG] Missing keys found: {'bannerType'}
    [DEBUG] Message type: liveChatBannerRenderer
    [DEBUG] Action type: addBannerToLiveChatCommand
    [DEBUG] Action: {'addBannerToLiveChatCommand': {'bannerRenderer': {'liveChatBannerRenderer': {'header': {'liveChatBannerHeaderRenderer': {'icon': {'iconType': 'KEEP'}, 'text': {'runs': [{'text': 'Pinned by '}, {'text': '葉山舞鈴 / Ohayama Ch.'}]}, 'contextMenuButton': {'buttonRenderer': {'icon': {'iconType': 'MORE_VERT'}, 'accessibility': {'label': 'Chat actions'}, 'trackingParams': 'CB0Q8FsiEwiJ196s0eKEAxXM0DQHHdloD9k=', 'accessibilityData': {'accessibilityData': {'label': 'Chat actions'}}, 'command': {'clickTrackingParams': 'CB0Q8FsiEwiJ196s0eKEAxXM0DQHHdloD9k=', 'commandMetadata': {'webCommandMetadata': {'ignoreNavigation': True}}, 'liveChatItemContextMenuEndpoint': {'params': 'Q2g0S0hBb2FRMDVEYzJ0TmJVTnlTVVZFUm1JelJIZG5VV1J0U2xGQlkxRWFLU29uQ2hoVlEyWnBjRVJFYmpkM1dTMURMVk52VlVOb1ozaERVVkVTQzFCbVQxZEVVMVpLY1hkVklBRW9BVElhQ2hoVlEyWnBjRVJFYmpkM1dTMURMVk52VlVOb1ozaERVVkU0QVVnQVVBRSUzRA=='}}}}}}, 'contents': {'liveChatTextMessageRenderer': {'message': {'runs': [{'text': 'たまに出没します'}, {'emoji': {'emojiId': 'UCfipDDn7wY-C-SoUChgxCQQ/4gb9ZOKVEYWO_9EPwfu04Ag', 'shortcuts': [':_匂い立つなあ:', ':匂い立つなあ:'], 'searchTerms': ['_匂い立つなあ', '匂い立つなあ'], 'image': {'thumbnails': [{'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w24-h24-c-k-nd', 'width': 24, 'height': 24}, {'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w48-h48-c-k-nd', 'width': 48, 'height': 48}], 'accessibility': {'accessibilityData': {'label': '匂い立つなあ'}}}, 'isCustomEmoji': True}}, {'emoji': {'emojiId': 'UCfipDDn7wY-C-SoUChgxCQQ/4gb9ZOKVEYWO_9EPwfu04Ag', 'shortcuts': [':_匂い立つなあ:', ':匂い立つなあ:'], 'searchTerms': ['_匂い立つなあ', '匂い立つなあ'], 'image': {'thumbnails': [{'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w24-h24-c-k-nd', 'width': 24, 'height': 24}, {'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w48-h48-c-k-nd', 'width': 48, 'height': 48}], 'accessibility': {'accessibilityData': {'label': '匂い立つなあ'}}}, 'isCustomEmoji': True}}, {'emoji': {'emojiId': 'UCfipDDn7wY-C-SoUChgxCQQ/4gb9ZOKVEYWO_9EPwfu04Ag', 'shortcuts': [':_匂い立つなあ:', ':匂い立つなあ:'], 'searchTerms': ['_匂い立つなあ', '匂い立つなあ'], 'image': {'thumbnails': [{'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w24-h24-c-k-nd', 'width': 24, 'height': 24}, {'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w48-h48-c-k-nd', 'width': 48, 'height': 48}], 'accessibility': {'accessibilityData': {'label': '匂い立つなあ'}}}, 'isCustomEmoji': True}}]}, 'authorName': {'simpleText': '葉山舞鈴 / Ohayama Ch.'}, 'authorPhoto': {'thumbnails': [{'url': 'https://yt4.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A=s32-c-k-c0x00ffffff-no-rj', 'width': 32, 'height': 32}, {'url': 'https://yt4.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A=s64-c-k-c0x00ffffff-no-rj', 'width': 64, 'height': 64}]}, 'id': 'ChwKGkNOQ3NrTW1DcklFREZiM0R3Z1FkbUpRQWNR', 'timestampUsec': '1694760425508658', 'authorBadges': [{'liveChatAuthorBadgeRenderer': {'icon': {'iconType': 'VERIFIED'}, 'tooltip': 'Verified', 'accessibility': {'accessibilityData': {'label': 'Verified'}}}}, {'liveChatAuthorBadgeRenderer': {'icon': {'iconType': 'OWNER'}, 'tooltip': 'Owner', 'accessibility': {'accessibilityData': {'label': 'Owner'}}}}], 'authorExternalChannelId': 'UCfipDDn7wY-C-SoUChgxCQQ', 'trackingParams': 'CAEQl98BIhMIidferNHihAMVzNA0Bx3ZaA_Z'}}, 'actionId': 'ChwKGkNKM3U5TXFDcklFREZYREN3Z1FkQTdzTFlB', 'viewerIsCreator': False, 'targetId': 'live-chat-banner', 'isStackable': False, 'backgroundType': 'LIVE_CHAT_BANNER_BACKGROUND_TYPE_STATIC', 'bannerProperties': {'autoCollapseDelay': {'seconds': '7'}}, 'bannerType': 'LIVE_CHAT_BANNER_TYPE_PINNED_MESSAGE'}}}}
    [DEBUG] Parsed data: {'action_type': 'add_banner_to_live_chat', 'message': 'たまに出没します:_匂い立つなあ::_匂い立つなあ::_匂い立つなあ:', 'emotes': [{'id': 'UCfipDDn7wY-C-SoUChgxCQQ/4gb9ZOKVEYWO_9EPwfu04Ag', 'name': ':_匂い立つなあ:', 'shortcuts': [':_匂い立つなあ:', ':匂い立つなあ:'], 'search_terms': ['_匂い立つなあ', '匂い立つなあ'], 'images': [{'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q', 'id': 'source'}, {'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w24-h24-c-k-nd', 'width': 24, 'height': 24, 'id': '24x24'}, {'url': 'https://yt3.ggpht.com/00BWbvjS7VaT7HJRNvsP0MrObtq2H-5_CvYWcJ4DLsnVEYCoHf2jTnhv06gTjQvNsVbc8tyj2Q=w48-h48-c-k-nd', 'width': 48, 'height': 48, 'id': '48x48'}], 'is_custom_emoji': True}], 'message_id': 'ChwKGkNOQ3NrTW1DcklFREZiM0R3Z1FkbUpRQWNR', 'timestamp': 1694760425508658, 'author': {'name': '葉 山舞鈴 / Ohayama Ch.', 'images': [{'url': 'https://yt4.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A', 'id': 'source'}, {'url': 'https://yt4.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A=s32-c-k-c0x00ffffff-no-rj', 'width': 32, 'height': 32, 'id': '32x32'}, {'url': 'https://yt4.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A=s64-c-k-c0x00ffffff-no-rj', 'width': 64, 'height': 64, 'id': '64x64'}], 'badges': [{'title': 'Verified', 'icon_name': 'verified'}, {'title': 'Owner', 'icon_name': 'owner'}], 'id': 'UCfipDDn7wY-C-SoUChgxCQQ'}}
    [DEBUG] Missing keys found: {'isV2Style', 'creatorHeartButton'}
    [DEBUG] Message type: liveChatPaidMessageRenderer
    [DEBUG] Action type: addChatItemAction
    [DEBUG] Action: {'addChatItemAction': {'item': {'liveChatPaidMessageRenderer': {'id': 'ChwKGkNPYWRsT18tNFlRREZhelF3Z1FkdVZNSE5R', 'timestampUsec': '1709809075458031', 'authorName': {'simpleText': 'ヤキトリ'}, 'authorPhoto': {'thumbnails': [{'url': 'https://yt4.ggpht.com/ytc/AIdro_nG3GFABZchBYjPU8sCEeC1VSWzssVUGxMiOE3X6A=s32-c-k-c0x00ffffff-no-rj', 'width': 32, 'height': 32}, {'url': 'https://yt4.ggpht.com/ytc/AIdro_nG3GFABZchBYjPU8sCEeC1VSWzssVUGxMiOE3X6A=s64-c-k-c0x00ffffff-no-rj', 'width': 64, 'height': 64}]}, 'purchaseAmountText': {'simpleText': '¥990'}, 'message': {'runs': [{'emoji': {'emojiId': '✨', 'shortcuts': [':sparkles:'], 'searchTerms': ['sparkles'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u2728.svg'}], 'accessibility': {'accessibilityData': {'label': '✨'}}}}}, {'emoji': {'emojiId': '🌟', 'shortcuts': [':glowing_star:', ':star2:'], 'searchTerms': ['glowing', 'star', 'star2'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f31f.svg'}], 'accessibility': {'accessibilityData': {'label': '🌟'}}}}}, {'emoji': {'emojiId': '🐟', 'shortcuts': [':fish:'], 'searchTerms': ['fish'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f41f.svg'}], 'accessibility': {'accessibilityData': {'label': '🐟'}}}}}, {'emoji': {'emojiId': '🪐', 'shortcuts': [':ringed_planet:'], 'searchTerms': ['ringed', 'planet'], 'image': {'thum bnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1fa90.svg'}], 'accessibility': {'accessibilityData': {'label': '🪐'}}}}}, {'emoji': {'emojiId': '🐟', 'shortcuts': [':fish:'], 'searchTerms': [ 'fish'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f41f.svg'}], 'accessibility': {'accessibilityData': {'label': '🐟'}}}}}, {'emoji': {'emojiId': '🌟', 'shortcuts': [':glowing_star:', ':star2:'], 'searchTerms': ['glowing', 'star', 'star2'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f31f.svg'}], 'accessibility': {'accessibilityData': {'label': '🌟'}}}}}, {'emoji': {'emojiId': '✨', 'shortcuts': [':sparkles:'], 'searchTerms': ['sparkles'], 'image': {'thumbnails': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u2728.svg'}], 'accessibility': {'accessibilityData': {'label': '✨'}}}}}]}, 'headerBackgroundColor': 4278239141, 'headerTextColor': 4278190080, 'bodyBackgroundColor': 4280150454, 'bodyTextColor': 4278190080, 'authorExternalChannelId': 'UCAI6eRIni_g3kIisDErtOqA', 'authorNameTextColor': 2315255808, 'contextMenuEndpoint': {'clickTrackingParams': 'CBwQ7rsEIhMIidferNHihAMVzNA0Bx3ZaA_Z', 'commandMetadata': {'webCommandMetadata': {'ignoreNavigation': True}}, 'liveChatItemContextMenuEndpoint': {'params': 'Q2g0S0hBb2FRMDloWkd4UFh5MDBXVkZFUm1GNlVYZG5VV1IxVmsxSVRsRWFLU29uQ2hoVlEyWnBjRVJFYmpkM1dTMURMVk52VlVOb1ozaERVVkVTQzFCbVQxZEVVMVpLY1hkVklBRW9BVElhQ2hoVlEwRkpObVZTU1c1cFgyY3phMGxwYzBSRmNuUlBjVUU0QWtnQVVBOCUzRA=='}}, 'timestampColor': 2147483648, 'contextMenuAccessibility': {'accessibilityData': {'label': 'Chat actions'}}, 'trackingParams': 'CBwQ7rsEIhMIidferNHihAMVzNA0Bx3ZaA_Z', 'textInputBackgroundColor': 822083583, 'creatorHeartButton': {'creatorHeartViewModel': {'creatorThumbnail': {'sources': [{'url': 'https://yt3.ggpht.com/Rwtv4_PFBtjXo2UQpIDNWhTe6QTG3SM6UrlmLghFEcWggXGXAvxUDSa9FB5Zg8Xl2gB9rj8i8A=s48-c-k-c0x00ffffff-no-rj'}]}, 'heartedIcon': {'sources': [{'clientResource': {'imageName': 'full_heart-filled'}}]}, 'unheartedIcon': {'sources': [{'clientResource': {'imageName': 'full_heart'}}], 'processor': {'borderImageProcessor': {'imageTint': {'color': 4278190080}}}}, 'heartedHoverText': '❤ by 葉山舞鈴 / Ohayama Ch.', 'heartedAccessibilityLabel': 'Remove heart', 'unheartedAccessibilityLabel': 'Heart', 'engagementStateKey': 'EktsaXZlLWNoYXQtbWVzc2FnZS1lbmdhZ2VtZW50LXN0YXRlLUNod0tHa05QWVdSc1QxOHRORmxSUkVaaGVsRjNaMUZrZFZaTlNFNVIgLCgB'}}, 'isV2Style': True}}, 'clientId': 'COadlO_-4YQDFazQwgQduVMHNQ'}}
    [DEBUG] Parsed data: {'action_type': 'add_chat_item', 'message_id': 'ChwKGkNPYWRsT18tNFlRREZhelF3Z1FkdVZNSE5R', 'timestamp': 1709809075458031, 'money': {'text': '¥990', 'amount': 990.0, 'currency': 'JPY', 'currency_symbol': '¥'}, 'message': ':sparkles::glowing_star::fish::ringed_planet::fish::glowing_star::sparkles:', 'emotes': [{'id': '✨', 'name': ':sparkles:', 'shortcuts': [':sparkles:'], 'search_terms': ['sparkles'], 'images': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u2728.svg', 'id': 'source'}, {'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u2728.svg'}], 'is_custom_emoji': False}, {'id': '🌟', 'name': ':glowing_star:', 'shortcuts': [':glowing_star:', ':star2:'], 'search_terms': ['glowing', 'star', 'star2'], 'images': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f31f.svg', 'id': 'source'}, {'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f31f.svg'}], 'is_custom_emoji': False}, {'id': '🐟', 'name': ':fish:', 'shortcuts': [':fish:'], 'search_terms': ['fish'], 'images': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f41f.svg', 'id': 'source'}, {'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1f41f.svg'}], 'is_custom_emoji': False}, {'id': '🪐', 'name': ':ringed_planet:', 'shortcuts': [':ringed_planet:'], 'search_terms': ['ringed', 'plane t'], 'images': [{'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1fa90.svg', 'id': 'source'}, {'url': 'https://www.youtube.com/s/gaming/emoji/0f0cae22/emoji_u1fa90.svg'}], 'is_custom_emoji': False}], 'timestamp_colour': '#00000080', 'body_background_colour': '#1de9b6ff', 'header_text_colour': '#000000ff', 'header_background_colour': '#00bfa5ff', 'body_text_colour': '#000000ff', 'text_input_background_colour': '#ffffff30', 'author': {'name': 'ヤキトリ', 'images': [{'url': 'https://yt4.ggpht.com/ytc/AIdro_nG3GFABZchBYjPU8sCEeC1VSWzssVUGxMiOE3X6A', 'id': 'source'}, {'url': 'https://yt4.ggpht.com/ytc/AIdro_nG3GFABZchBYjPU8sCEeC1VSWzssVUGxMiOE3X6A=s32-c-k-c0x00ffffff-no-rj', 'width': 32, 'height': 32, 'id': '32x32'}, {'url': 'https://yt4.ggpht.com/ytc/AIdro_nG3GFABZchBYjPU8sCEeC1VSWzssVUGxMiOE3X6A=s64-c-k-c0x00ffffff-no-rj', 'width': 64, 'height': 64, 'id': '64x64'}], 'id': 'UCAI6eRIni_g3kIisDErtOqA', 'name_text_colour': '#0000008a'}}
    [DEBUG] Total number of messages: 0
    [DEBUG] Continuation info: {'invalidationId': {'objectSource': 1056, 'objectId': 'Y2hhdH5QZk9XRFNWSnF3VX41Njk5NDM4', 'topic': 'chat~PfOWDSVJqwU~5699438', 'subscribeToGcmTopics': True, 'protoCreationTimestampMs': '1709831137788'}, 'timeoutMs': 10000, 'continuation': '0ofMyAP_ARpeQ2lrcUp3b1lWVU5tYVhCRVJHNDNkMWt0UXkxVGIxVkRhR2Q0UTFGUkVndFFaazlYUkZOV1NuRjNWUm9UNnFqZHVRRU5DZ3RRWms5WFJGTldTbkYzVlNBQk1BQSUzRCjvn86U_-GEAzAAQAJKYggAGAAgAEoIEAAYACAAMABQ-OjerNHihANYBHgAogEFGgMI2ASqAQwQABoAIgAqBAgAEACwAQDAAQDIAfjo3qzR4oQD4gEMCOHnp68GEOfZve4C6AEA8AEA-AEAiAIAkAIAUIf53JT_4YQDWN743JT_4YQDggEECAEYAYgBAKABlIfgrNHihAO6AQIICtABAA%3D%3D', 'clickTrackingParams': 'CAEQl98BIhMIidferNHihAMVzNA0Bx3ZaA_Z'}
    [DEBUG] Sleeping for 8000ms.
    [DEBUG] https://www.youtube.com:443 "POST /youtubei/v1/live_chat/get_live_chat?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1" 200 None
    [DEBUG] Continuation parameters: {'click_tracking': {'clickTrackingParams': 'CAEQl98BIhMIidferNHihAMVzNA0Bx3ZaA_Z'}, 'continuation': '0ofMyAP_ARpeQ2lrcUp3b1lWVU5tYVhCRVJHNDNkMWt0UXkxVGIxVkRhR2Q0UTFGUkVndFFaazlYUkZOV1NuRjNWUm9UNnFqZHVRRU5DZ3RRWms5WFJGTldTbkYzVlNBQk1BQSUzRCjvn86U_-GEAzAAQAJKYggAGAAgAEoIEAAYACAAMABQ-OjerNHihANYBHgAogEFGgMI2ASqAQwQABoAIgAqBAgAEACwAQDAAQDIAfjo3qzR4oQD4gEMCOHnp68GEOfZve4C6AEA8AEA-AEAiAIAkAIAUIf53JT_4YQDWN743JT_4YQDggEECAEYAYgBAKABlIfgrNHihAO6AQIICtABAA%3D%3D'}
    [DEBUG] Session headers: User-Agent, Accept-Language, origin, x-youtube-client-name, x-youtube-client-version, x-origin, x-goog-authuser, x-goog-visitor-id, content-type, referer
    [DEBUG] Logged-in info: {'key': 'logged_in', 'value': '0'}
    [DEBUG] No actions to process.
    [DEBUG] Continuation info: {'invalidationId': {'objectSource': 1056, 'objectId': 'Y2hhdH5QZk9XRFNWSnF3VX41Njk5NDM4', 'topic': 'chat~PfOWDSVJqwU~5699438', 'subscribeToGcmTopics': True, 'protoCreationTimestampMs': '1709831146045'}, 'timeoutMs': 10000, 'continuation': '0ofMyAP_ARpeQ2lrcUp3b1lWVU5tYVhCRVJHNDNkMWt0UXkxVGIxVkRhR2Q0UTFGUkVndFFaazlYUkZOV1NuRjNWUm9UNnFqZHVRRU5DZ3RRWms5WFJGTldTbkYzVlNBQk1BQSUzRCjvn86U_-GEAzAAQAJKYggAGAAgAEoIEAAYACAAMABQ-OjerNHihANYBHgAogEFGgMI2ASqAQwQABoAIgAqBAgAEACwAQDAAQDIAfjo3qzR4oQD4gEMCOHnp68GEOfZve4C6AEA8AEA-AEAiAIAkAIAUIf53JT_4YQDWN743JT_4YQDggEECAEYAYgBAKAB0P3XsNHihAO6AQIICtABAA%3D%3D'}
    [DEBUG] Sleeping for 8000ms.
    [DEBUG] https://www.youtube.com:443 "POST /youtubei/v1/live_chat/get_live_chat?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1" 200 None
    [DEBUG] Continuation parameters: {'click_tracking': {'clickTrackingParams': 'CAEQl98BIhMIidferNHihAMVzNA0Bx3ZaA_Z'}, 'continuation': '0ofMyAP_ARpeQ2lrcUp3b1lWVU5tYVhCRVJHNDNkMWt0UXkxVGIxVkRhR2Q0UTFGUkVndFFaazlYUkZOV1NuRjNWUm9UNnFqZHVRRU5DZ3RRWms5WFJGTldTbkYzVlNBQk1BQSUzRCjvn86U_-GEAzAAQAJKYggAGAAgAEoIEAAYACAAMABQ-OjerNHihANYBHgAogEFGgMI2ASqAQwQABoAIgAqBAgAEACwAQDAAQDIAfjo3qzR4oQD4gEMCOHnp68GEOfZve4C6AEA8AEA-AEAiAIAkAIAUIf53JT_4YQDWN743JT_4YQDggEECAEYAYgBAKAB0P3XsNHihAO6AQIICtABAA%3D%3D'}
    [DEBUG] Session headers: User-Agent, Accept-Language, origin, x-youtube-client-name, x-youtube-client-version, x-origin, x-goog-authuser, x-goog-visitor-id, content-type, referer
    [DEBUG] Logged-in info: {'key': 'logged_in', 'value': '0'}
    [DEBUG] No actions to process.
    [DEBUG] Continuation info: {'invalidationId': {'objectSource': 1056, 'objectId': 'Y2hhdH5QZk9XRFNWSnF3VX41Njk5NDM4', 'topic': 'chat~PfOWDSVJqwU~5699438', 'subscribeToGcmTopics': True, 'protoCreationTimestampMs': '1709831154174'}, 'timeoutMs': 10000, 'continuation': '0ofMyAP_ARpeQ2lrcUp3b1lWVU5tYVhCRVJHNDNkMWt0UXkxVGIxVkRhR2Q0UTFGUkVndFFaazlYUkZOV1NuRjNWUm9UNnFqZHVRRU5DZ3RRWms5WFJGTldTbkYzVlNBQk1BQSUzRCjvn86U_-GEAzAAQAJKYggAGAAgAEoIEAAYACAAMABQ-OjerNHihANYBHgAogEFGgMI2ASqAQwQABoAIgAqBAgAEACwAQDAAQDIAfjo3qzR4oQD4gEMCOHnp68GEOfZve4C6AEA8AEA-AEAiAIAkAIAUIf53JT_4YQDWN743JT_4YQDggEECAEYAYgBAKAB25PItNHihAO6AQIICtABAA%3D%3D'}
    [DEBUG] Sleeping for 8000ms.
    [ERROR] Keyboard Interrupt
    [DEBUG] Session closed.

Expected behavior

Correctly resolving to the streaming room that is currently live rather than others.