Is there any way to get the live chat replay log/history for YouTube streaming video?

Chat Downloader is a tool I developed to retrieve chat messages from livestreams, videos, clips and past broadcasts. No authentication needed!

The recommended way to install is from PyPI using pip:

pip install chat-downloader

The program can then be accessed from the command line or using the Python module:

Command line

chat_downloader https://www.youtube.com/watch?v=5qap5aO4i9A

For advanced command line use-cases and examples, consult the Command Line Wiki.

Python

from chat_downloader import ChatDownloader

url="https://www.youtube.com/watch?v=5qap5aO4i9A"
chat = ChatDownloader().get_chat(url)       # create a generator
for message in chat:                        # iterate over messages
    print(chat.format(message))             # print the formatted message

For advanced python use-cases and examples, consult the Python Wiki.


Features include specifying start and/or end times and outputting to JSON, CSV and text files.

The software is open-source (MIT license) and is actively under development. The source code can be found on GitHub:
https://github.com/xenova/chat-downloader

Leave a Comment