Skip to main content

Douyin Downloader

douyin-downloader

简体中文 · English

Download Douyin videos and photos without watermarks. Use Douzy for a desktop interface, the Python CLI for scripts, or the agent skill so AI agents such as Claude Code and Codex can read the hot board, search, and record live streams.

Douzy Desktop

A desktop app for Douyin, TikTok, YouTube, Telegram, and X. Paste links, track downloads, and browse your local archive.

Download for Windows / macOS

Platform features depend on enabled plugins or local components. Some batch and advanced features require activation.

Platform Content
Douyin Videos, photos, profiles, collections; following, subscriptions, favorites, and likes
TikTok Public videos, photos, and profiles
YouTube Videos, Shorts, channels, and playlists; audio and subtitles
Telegram Media from accessible chats, groups, and channels; requires setup and sign-in
X Posts, profile media, your bookmarks and likes; requires account cookies
Douyin TikTok YouTube
Douzy Douyin workspace Douzy TikTok workspace Douzy YouTube workspace
Telegram setup X Task center
Douzy Telegram setup Douzy X workspace Douzy task center
Douyin (light) YouTube (light) Task center (light)
Douzy Douyin workspace in light mode Douzy YouTube workspace in light mode Douzy task center in light mode

Screenshots: Douzy 0.13.0 on macOS (light and dark themes, 1440 × 900, sample data). Telegram is shown before setup. Click an image to enlarge.

CLI Status

The CLI supports Douyin only. It includes batch downloads, date filters, retries, download history, and optional comments, transcription, and notifications.

Download limitations: Douyin's request verification currently blocks CLI downloads of individual videos/photos, collections, music, likes, and favorites. Profile posts can try the Playwright browser fallback, but success is not guaranteed. Use Douzy for everyday downloads.

Refreshing cookies or retrying does not fix this verification block. Live recording is experimental: FFmpeg records the stream in segments, converts each segment to MP4, and reconnects after drops.

Quick Start

Requires Python 3.10+ on Windows, macOS, or Linux. Read the CLI limitations above first.

1. Install

git clone https://github.com/jiji262/douyin-downloader.git
cd douyin-downloader
python -m pip install -r requirements.txt
python -m pip install playwright
python -m playwright install chromium

2. Configure and sign in

Copy config.example.yml to config.yml:

cp config.example.yml config.yml
python -m tools.cookie_fetcher --config config.yml

On Windows PowerShell, use Copy-Item config.example.yml config.yml to copy the file. Sign in to Douyin in the browser, then return to the terminal and press Enter to save cookies.

Replace the sample link in config.yml with your creator's profile URL. Keep the saved cookies and adjust these fields:

link:
  - https://www.douyin.com/user/YOUR_SEC_UID
path: ./Downloaded/
mode: [post]
number:
  post: 10                 # 0 = unlimited
increase:
  post: true              # skip downloaded items
redownload_missing_files: true

3. Run

python run.py -c config.yml

Use python run.py --help for all options.

Option Purpose
-c, --config Config file
-u, --url Append a URL to the links in the config; repeatable
-p, --path Download folder
-t, --thread Concurrent downloads
-v, --verbose Detailed logs
Exit code Meaning
0 Finished. Some items may still have failed; check the summary
1 Nothing was downloaded or skipped and at least one item failed, or a fatal error occurred
3 The sign-in expired and could not be renewed; the other URLs in the batch were still processed

Configuration

Full settings and examples: config.example.yml.

Setting Purpose
number.post Item limit; 0 means unlimited
start_time / end_time Date range (YYYY-MM-DD); includes the whole end date
video_quality highest by default; original tries the original upload and falls back
increase.post true skips downloaded items; false downloads again and overwrites files in the selected scope
redownload_missing_files Default true: download missing files again. With false, valid database history can still skip them

Incremental downloads check for non-empty primary media on disk. You do not need to clear the database to download again: set increase.post: false. The same switch is available for like, mix, and music.

More CLI commands
# Hot search board and keyword search → JSONL
python run.py --hot-board 30
python run.py --search "cats" --search-max 50

# Optional REST API server
python -m pip install fastapi uvicorn
python run.py --serve --serve-port 8000

Comments, transcription, notifications, and live recording are configured in config.example.yml.

Agent / Skill Mode

douyin-dl agent <verb> is a machine-readable mode for AI agents. Each run prints exactly one JSON line on stdout (logs go to stderr), with stable error and exit codes. The bundled skill skills/douyin-dl/ teaches an agent when and how to call it.

1. Install the CLI

uv tool install douyin-dl-cli    # or: pipx install douyin-dl-cli
# unreleased code from GitHub: uv tool install git+https://github.com/jiji262/douyin-downloader
douyin-dl agent doctor

The PyPI package is douyin-dl-cli; the command it installs is douyin-dl. In a cloned checkout with the requirements installed, python run.py agent doctor works too. Do not pip install the package into a shared environment: its top-level packages utils, core, and config collide with other projects.

2. Install the skill (pick one)

# Claude Code
/plugin marketplace add jiji262/douyin-downloader
/plugin install douyin-dl@douyin-dl

# Codex and other agents: copy the folder
cp -r skills/douyin-dl ~/.agents/skills/

# or use the skills CLI
npx skills add jiji262/douyin-downloader

3. Try it

douyin-dl agent hot --max 3
# {"schema":1,"ok":true,"verb":"hot","version":"2.1.0","data":{"items":[…],"count":3},"error":null,"warnings":[]}
Status Capabilities
Available Hot search board (hot), link classification (inspect), live recording (live), local transcription (transcribe), environment check (doctor)
Sign-in required Keyword search (search), profile info (user); sign in with douyin-dl agent login in your own browser window
Blocked Downloading videos/photos, collections, music, or a profile's posts by link returns ARGUS_GATED. Use Douzy

Exit codes: 0 success · 1 internal error · 2 bad arguments or unsupported link · 3 sign-in required · 4 ARGUS_GATED · 5 upstream returned nothing (rate limit, anti-bot, or the room is not live) · 6 partial result · 7 missing dependency · 130 interrupted.

  • Agent mode keeps its own sign-in in ~/.douyin-dl (set DOUYIN_DL_HOME to move it). It does not read config.yml or the cookies saved by tools.cookie_fetcher, and cookie values never appear in its output.
  • login needs Playwright and Chromium; transcribe needs Whisper. doctor lists what is missing with the exact install command.
  • Set DOUYIN_PROXY to send requests through a proxy.

Details: contract · troubleshooting

FAQ

Cookies expired? Run python -m tools.cookie_fetcher --config config.yml again.

Only a few profile posts? Keep browser_fallback.enabled: true and headless: false. Complete any verification yourself in the browser; the current verification block may still prevent downloads.

Need logs? Run python run.py -c config.yml -v.

Development

python -m pip install -e ".[dev]"
python -m pytest tests/
ruff check .

Community & License

QQ group · LINUX DO · MIT License

Community QR code

For learning and personal data management. Respect copyright, privacy, and platform rules. You are responsible for how you use this tool; platform changes may affect availability.

Star History

View GitHub Star History

Metadata

Release files for douyin-dl-cli 2.1.0

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

Source distribution (sdist)

Source distribution for douyin-dl-cli 2.1.0
File Size Uploaded Provenance Actions
douyin_dl_cli-2.1.0.tar.gz 453.4 kB With provenance Details for douyin_dl_cli-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for douyin-dl-cli 2.1.0
File Interpreter ABI Platform Actions
douyin_dl_cli-2.1.0-py3-none-any.whl Python 3 none any Details for douyin_dl_cli-2.1.0-py3-none-any.whl

Total release size: 744.2 kB

Release files / douyin_dl_cli-2.1.0.tar.gz

Download URL douyin_dl_cli-2.1.0.tar.gz
Size 453.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eb3935d03ceb6b0e0b399ec8b20408733036e092b9ea21e5192532ea5bf91755
BLAKE2b-256 checksum
How to use checksums
e7b04b8c94ea2700ccb911e16a829adb70cf85cacbb63e23f4ac20a49a13e785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / douyin_dl_cli-2.1.0-py3-none-any.whl

Download URL douyin_dl_cli-2.1.0-py3-none-any.whl
Size 290.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e089ccc4ba6093c2aac51f93579daf43e0f17a2f1dd1c85c4bdb3e2f495f922d
BLAKE2b-256 checksum
How to use checksums
548b5a23b16080c2cbc2dc55f94a2606657db2649c7d9a93f1097cf674160e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for douyin-dl-cli 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for douyin_dl_cli-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files Full provenance

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