834 B
834 B
Pyktok Helper
A small wrapper around Pyktok to download a single TikTok video.
Reference: Pyktok on PyPI — https://pypi.org/project/pyktok/
Setup
cd tools/pyktok
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Install browser drivers required by playwright
python -m playwright install
# On some systems you may also need OS deps:
# python -m playwright install-deps
Usage
# In the virtualenv
python download_tt.py --url "https://www.tiktok.com/@user/video/123..." --out ./downloads
# Prints the absolute path to the downloaded .mp4 on success
Notes:
- Pyktok may require a logged-in browser session for certain videos. See Pyktok docs for
specify_browserusage if needed. - This script emits only the final .mp4 path on stdout for easy consumption by Node.