如何在没有API的情况下从YouTube视频直播中存档聊天记录?

3
我有一个想从YouTube下载的视频,但我也想要整个直播的聊天记录。
youtube-dl \
--limit-rate '0.25M' \
--retries '3' \
--no-overwrites \
--call-home \
--write-info-json \
--write-description \
--write-thumbnail \
--all-subs \
--convert-subs 'srt' \
--write-annotations \
--add-metadata \
--embed-subs \
--download-archive '/archive/videos/gamer_Archive/gamer_Archive.ytdlarchive' \
--format 'bestvideo+bestaudio/best' \
--merge-output-format 'mkv' \
--output '/archive/videos/gamer_Archive/%(upload_date)s_%(id)s/gamer_Archive_%(upload_date)s_%(id)s_%(title)s.%(ext)s' \
'https://www.youtube.com/watch?v=HPmhA3FpQNA' ;

我显然不是这个视频的所有者,也无法使用API来获取聊天记录。我该如何获取视频以及所有聊天记录?我能用YouTube-DL实现吗?我尝试了元数据、嵌入字幕和其他所有我能在网上找到的方法,希望聊天记录写在某个地方,但我找不到。

1个回答

1
我使用了这个库来完成它:https://pypi.org/project/chat-replay-downloader/ 执行此操作的命令(Linux、bash、Python):
$ python -m venv venv
$ source venv/bin/activate
$ pip install chat-replay-downloader
$ chat_replay_downloader https://www.youtube.com/watch?v=yOP-VT0Q9mk >> chat.txt

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接