chat-downloader: [BUG] Downloader thinks it has finished retrieving chat on the second request on member-only streams
Basic information
- Program version: 0.0.8
- Python version: 3.6.9
- Operating system: Ubuntu
Describe the bug
I’m trying to get the livechat from an ongoing member stream.
The downloader outputs to stderr [INFO] Finished retrieving chat.
after the second message batch, then the program closes.
I’m not yet sure if member-only is the cause, I’ll keep trying on subsequent member-only streams I have access to.
Command/Code used
If running from the command line, provide the following:
- The command used (including the verbose tag,
-v
):
chat_downloader "$URL" --cookies cookies.txt -v
- Output from the above command:
[DEBUG] Python version: 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0]
[DEBUG] Program version: 0.0.8
[DEBUG] Initialisation parameters: {'cookies': 'tl_bot/cookies.txt', 'proxy': None, 'hea
ders': None}
[INFO] Site: youtube.com
[DEBUG] Program parameters: {'buffer_size': 4096, 'message_receive_timeout': 0.1, 'chat_
type': 'live', 'format_file': None, 'format': 'youtube', 'message_types': None, 'message
_groups': ['messages'], 'exit_on_debug': False, 'pause_on_debug': False, 'logging': 'deb
ug', 'max_messages': None, 'timeout': None, 'retry_timeout': None, 'max_attempts': 15, '
end_time': None, 'start_time': None, 'url': 'https://youtu.be/33LME76okKw', 'inactivity_
timeout': None}
[DEBUG] Starting new HTTPS connection (1): www.youtube.com:443
[DEBUG] https://www.youtube.com:443 "GET /watch?v=33LME76okKw HTTP/1.1" 200 None
[DEBUG] Chat information: {'chat': <generator object YouTubeChatDownloader._get_chat_mes
sages at 0x7f5b27cf94c0>, 'title': '【 メン限 】手術後初のピアノのお時間なのら🎹🎵【姫森
ルーナ/ホロライブ】', 'duration': 0, 'is_live': True, 'start_time': 1614006016703036.0,
'site': <chat_downloader.sites.youtube.YouTubeChatDownloader object at 0x7f5b27d3a860>,
'format': <function ChatDownloader.get_chat.<locals>.<lambda> at 0x7f5b29816950>}
[INFO] Retrieving chat for "【 メン限 】手術後初のピアノのお時間なのら🎹🎵【姫森ルーナ/
ロライブ】".
[DEBUG] Getting Live chat (Live chat).
[DEBUG] https://www.youtube.com:443 "GET /live_chat?continuation=0ofMyANhGlhDaWtxSndvWVZ
VTmhPVmsxTjJkbVpWa3dXbkp2WDI1dlNGSldjbTUzRWdzek0weE5SVGMyYjJ0TGR4b1Q2cWpkdVFFTkNnc3pNMHh
OUlRjMmIydExkeUFCMAGCAQIIAQ%3D%3D HTTP/1.1" 200 None
# messages omitted
[DEBUG] Total number of messages: 75
[DEBUG] Sleeping for 10000ms.
[DEBUG] Continuation: 0ofMyAOkARpYQ2lrcUp3b1lWVU5oT1ZrMU4yZG1aVmt3V25KdlgyNXZTRkpXY201M0
Vnc3pNMHhOUlRjMmIydExkeG9UNnFqZHVRRU5DZ3N6TTB4TlJUYzJiMnRMZHlBQijv_Jbl5v3uAjAAOABAAkoVCA
AQABgBIABQ9pfe5eb97gJYA3gAUKSeveXm_e4CWPnkpZ34_O4CggECCAGIAQCgAYyI5OXm_e4C
[DEBUG] https://www.youtube.com:443 "POST /youtubei/v1/live_chat/get_live_chat?key=AIzaS
yAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8 HTTP/1.1" 200 None
[INFO] Finished retrieving chat.
[DEBUG] Session closed.
# 3 to 15 messages
Expected behavior
Downloader keeps outputting new messages as long as the stream is live.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 46 (31 by maintainers)
Commits related to this issue
- [sites:youtube] Generate and propagate headers (including authentication, #76) — committed to xenova/chat-downloader by xenova 3 years ago
- [sites:youtube] Fix authentication issue for YouTube member-only livestreams (Closes #76) Special thanks to @Lytexx and @tam-carre for bringing up this issue and helping with testing! — committed to 9001/chat-downloader by xenova 3 years ago
Woohoo! 🥳 Thanks so much for testing!
Okay! I’m feeling a lot more confident about these latest changes (55c4fd1096bcdb3da89bb2b42d04bd4acbd48d15)
Hopefully this works 😄 https://github.com/xenova/chat-downloader/tree/member-fix
Happy to be back 😃 I was super busy with university, and now I finally have some time to improve the tool.
Yep that works - your latest log includes the debug messages from the latest commit I made.
Alright, so the click tracking parameters are being passed to the next request (
CAEQl98BIhMI-ZHQxMfF8QIV1kR6BR1yWgCH
)… Could you maybe post the log from before the messages are displayed? (There should be some continuation information output there too, hopefully)Hmm, let me add some additional debug messages. I’m struggling to see what I am missing from the fix they implemented.
Hmmm… Let me try again.
I will do when I get the chance!