Skip to main content

Twitch Chat Downloader PyPI version

Neat python script to download chat messages from past broadcasts

Requirements

Installation and usage

There are multiple ways to install this script.

# 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>

Settings

To override default options, run python -m tcd --generate-config and edit generated settings.json or just use console arguments listed below.

Option Type Argument Description
client_id str --client-id Twitch API Client-ID header.
cooldown int --cooldown Delay (in milliseconds) between API calls.
display_progress bool --[no-]progress Display animated progress bar in terminal.
formats str[] -f/--formats List of formats to download. See Formats table below.
directory str -t/--directory Name of directory to save all generated files.
filename_format str --filename-format Full format of generated filenames. Possible arguments: directory, video_id and format.
max_width int --max-width Add line breaks to fit messages into specified width. Note: Implemented only for SSA/ASS subtitles.
subtitle_duration int --subtitle-duration Duration (in seconds) of each line of subtitles.
dynamic_duration obj Convert Kappa Kappa Kappa to Kappa x3.
—.enabled bool --[no-]dynamic-duration Increase subtitle duration based on message length.
—.max int --dynamic-duration-max Maximum duration of subtitle message.
—.max_length int --dynamic-duration-max-length Maximum length of subtitle message.
group_repeating_emotes obj Convert Kappa Kappa Kappa to Kappa x3.
—.enabled bool --[no-]group Enable or disable this function.
—.threshold int --group-threshold Number of repeating emotes to trigger this function.
—.collocations int --group-collocations Maximum number of words in repeating collocations (default: 1, more is slower).
—.collocations_threshold int --group-collocations-threshold Same logic as in —.threshold, but applies only to repeating collocations.
—.format str --group-format Customize format of replaced emotes.
video_types str --video-types Comma-separated list of VOD types to detect in Channel Mode. (see broadcast_type)

Formats

Format Description
ass or ssa Advanced SubStation Alpha
srt SubRip
irc IRC-style log

Notes

  • Empty messages means the user has been timed out. There's no known way to get these.
  • This script is using Twitch's API v5 that is deprecated.
  • Consider increasing the delay between API calls in settings.json to avoid a potential temporary block from Twitch for sending too many requests when downloading messages from very long streams.

Metadata

Release files for tdh-tcd 2.4.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tdh-tcd 2.4.8
File Size Uploaded
tdh-tcd-2.4.8.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tdh-tcd 2.4.8
File Interpreter ABI Platform
tdh_tcd-2.4.8-py3-none-any.whl Python 3 none any Details

Total release size: 21.4 kB

Release files / tdh-tcd-2.4.8.tar.gz

Download URL tdh-tcd-2.4.8.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
baa16821dd9315243243d7366f7e2337470ac93d513ff4822feee8696b9b4d46
BLAKE2b-256 checksum
How to use checksums
08f0df2ae0121e6037e87dfaba26da9259b6e9ad293705bb401cd7a1c664faea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / tdh_tcd-2.4.8-py3-none-any.whl

Download URL tdh_tcd-2.4.8-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb7cc344db9bfe1f105a94371daf34e13dd6ee90c7995eaeb8ef6781016571f7
BLAKE2b-256 checksum
How to use checksums
7b362bc64dd428e5bd46d9188576ed22bd422dd548300e97e1af539c77308e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

This release

2.4.8 This release

2 release files

2.4.7

2 release files

2.4.6

2 release files

2.4.5

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page