Twitch聊天下载程序

tdh-tcd的Python项目详细描述


Twitch Chat下载程序

从过去的广播下载聊天信息的整洁的python脚本

要求

安装和使用

有多种方法可以安装此脚本。

# Install package with pip
pip3 install tdh-tcd
python3 -m tcd <video_id>
# Run pip3 as root to install `tcd` for all users (not recommended)
sudo pip3 install tdh-tcd
tcd <video_id>
# Start script directly from cloned repository
git clone https://github.com/TheDrHax/Twitch-Chat-Downloader.git
cd Twitch-Chat-Downloader
pip install -r requirements.txt

python -m tcd <video_id>
# or ...
python app.py <video_id>

设置

要覆盖默认选项,请运行python -m tcd --generate-config,然后编辑生成的settings.json,或者只使用下面列出的控制台参数。

OptionTypeArgumentDescription
client_idstr^{}Twitch API Client-ID header.
cooldownint^{}Delay (in milliseconds) between API calls.
display_progressbool^{}Display animated progress bar in terminal.
formatsstr[]^{}List of formats to download. See Formats table below.
directorystr^{}/^{}Name of directory to save all generated files.
filename_formatstr^{}Full format of generated filenames. Possible arguments: ^{}, ^{} and ^{}.
subtitle_durationint^{}Duration (in seconds) of each line of subtitles.
dynamic_durationobjConvert ^{} to ^{}.
—.enabledbool^{}Increase subtitle duration based on message length.
—.maxint^{}Maximum duration of subtitle message.
—.max_lengthint^{}Maximum length of subtitle message.
group_repeating_emotesobjConvert ^{} to ^{}.
—.enabledbool^{}Enable or disable this function.
—.thresholdint^{}Number of repeating emotes to trigger this function.
—.formatstr^{}Customize format of replaced emotes.
video_typesstr^{}Comma-separated list of VOD types to detect in Channel Mode. (see broadcast_type)

格式

FormatDescription
^{} or ^{}Advanced SubStation Alpha
^{}SubRip
^{}IRC-style log

注释

  • 空消息表示用户已超时。没办法弄到这些。
  • 这个脚本使用的是twitch的api v5,即deprecated
  • 考虑在settings.json中增加api调用之间的延迟,以避免在从非常长的流下载消息时由于发送太多请求而引起的抽搐的潜在临时块。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java以编程方式最小化JInternalFrame?   java使用JsonPath将不均匀列表提取为类型化对象   spring如何将java/resources文件获取到InputStream?   Java逻辑错误并不总是存在   java Firebase,更新特定字段   Java stream groupby并同时加入以进行csv导出   java安卓:如果出现任何声音,监听器将录制声音   java如何从多个文件中轮询最后修改的文件并发送到apache camel中的目标端点?   java是否返回多个比较器?   JavaBean IO:Date MMM在CAPS中不解析   当JButton从另一个类单击时,java正在更新JLabel   基类中子类的Java泛型初始化   jakarta ee Java ee制作一个以毫秒为间隔的计时器来发送数据包   json Windows Azure日期格式转换为Java日期