有什么方法可以获取YouTube流视频的实时聊天重播日志/历史记录? [英] Is there any way to get the live chat replay log/history for YouTube streaming video?

查看:238
本文介绍了有什么方法可以获取YouTube流视频的实时聊天重播日志/历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在研究在线聊天消息的模式.我选择了YouTube和Twitch.tv作为聊天消息的来源.

I’ve been doing research on online chat message patterns recently. I’ve chosen YouTube and Twitch.tv for the chat message sources.

我已经找到了用于实时直播的聊天记录器,但是我还需要获取已经广播的直播的聊天记录/历史记录,以允许实时聊天重播(例如,

I’ve found chat loggers for real-time livestreams, but I also need acquire the chat log/history for already broadcasted livestreams which allow live chat replay (for example, https://www.youtube.com/watch?v=1JfohG5a8y8).

有一个用于Twitch.tv的工具(来自jdpurcell的RechatTool ),但我无法找到适用于YouTube的任何类似工具.

There is a tool for Twitch.tv (RechatTool from jdpurcell), but I couldn’t find any similar tool for YouTube.

我已检查用于实时消息的YouTube API ,但找不到有关如何访问实时聊天重播的任何说明或提示.有没有可能的解决方案?

I’ve checked YouTube API for livestream messages, but I couldn’t find any instructions or tips on how to access live chat replays. Is there any possible solutions for this?

推荐答案

聊天下载器是我开发的一种工具,用于从直播,视频,剪辑和过去的广播中检索聊天消息.无需身份验证!

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


然后可以从命令行或使用Python模块访问该程序:


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

命令行

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

有关高级命令行用例和示例,请参见命令行Wiki .

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

有关高级python用例和示例,请参阅 Python Wiki .

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

功能包括指定开始和/或结束时间,并输出到JSON,CSV和文本文件.

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

该软件是开源的(MIT许可证),并且正在积极开发中.可以在GitHub上找到源代码: https://github.com/xenova/chat-downloader

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

这篇关于有什么方法可以获取YouTube流视频的实时聊天重播日志/历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆