Douyin (ๆ้ณ/TikTok China) CLI โ search, download, publish, trending, live, and more.
Install โข Quick Start โข Commands โข Features โข License
pip install dy-cliOr from source:
git clone https://github.com/Youhai020616/douyin.git
cd douyin && bash setup.shdy login # QR scan login (one time)
dy search "็พ้ฃ" # Search โ results cached
dy read 1 # Read 1st result (short index)
dy dl 1 # Download 1st result (no watermark)
dy like 1 # Like 1st result
dy trending # Hot trending Top 50
dy publish -t "ๆ ้ข" -c "ๆ่ฟฐ" -v video.mp4 # Publish video- ๐ Search โ keyword search with sort/time/type filters, user search
- ๐ฅ Download โ no-watermark video/image with progress bar, batch user download
- ๐ Publish โ video & image posts with tags, cover, scheduling, visibility
- ๐ฅ Trending โ real-time hot search Top 50 with watch mode
- ๐บ Live โ stream info, URL extraction, ffmpeg recording
- ๐ฌ Interact โ like, favorite, comment, follow (Playwright)
- ๐ Analytics โ creator dashboard via XHR interception
- ๐ค Profile โ user info, posts listing
- ๐ข Short Index โ
dy search โ dy read 1 โ dy like 1 โ dy dl 1 - ๐ฆ Export โ
dy search "AI" -o results.csv(JSON/CSV/YAML) - ๐ Login โ QR scan + browser cookie auto-extraction
- ๐ฅ Multi-Account โ isolated cookie storage
- ๐ก๏ธ Anti-Detection โ Gaussian jitter, exponential backoff, captcha cooldown
dy search "ๅ
ณ้ฎ่ฏ" # Search videos
dy search "ๅๅก" --sort ๆๅค็น่ต # Sort by likes
dy search "้ฃๆฏ" --type atlas # Search photo posts
dy search "ๆฅ้ฃ่ฎฐ" --type user # Search users
dy search "AI" -o results.csv # Export to CSV
dy read 1 # Read 1st result (short index)
dy detail AWEME_ID # Detail by ID
dy comments 1 # View comments (Playwright)dy dl 1 # Download by short index
dy download https://v.douyin.com/xxx # Download by URL
dy download 1234567890 --music # Also download BGM
dy dl SEC_USER_ID --user --limit 20 # Batch download user postsdy trending # Top 50
dy trending --count 10 -o hot.json # Export top 10
dy trending --watch # Auto-refresh every 5 min
dy live info ROOM_ID # Live stream info
dy live record ROOM_ID # Record with ffmpegdy publish -t "ๆ ้ข" -c "ๆ่ฟฐ" -v video.mp4 # Video
dy publish -t "ๆ ้ข" -c "ๆ่ฟฐ" -i img1.jpg -i img2.jpg # Image post
dy publish -t "ๆ ้ข" -v v.mp4 --tags AI --visibility ไป
่ชๅทฑๅฏ่ง # Private + tags
dy publish -t "ๆ ้ข" -v v.mp4 --schedule "2026-03-20T08:00:00+08:00" # Scheduled
dy pub -t "ๆ ้ข" -v v.mp4 --dry-run # Preview onlydy like 1 # Like (short index)
dy like 1 --unlike # Unlike
dy fav 1 # Favorite
dy comment 1 -c "ๅฅฝ็!" # Comment
dy follow SEC_USER_ID # Follow userdy me # My login info
dy profile SEC_USER_ID --posts # User profile + posts
dy analytics # Creator dashboard
dy notifications # Messagesdy login # QR scan login
dy login --browser # Extract cookies from browser
dy status # Login status
dy account list # List accounts
dy config show # Show config
dy config set api.proxy http://... # Set proxy| Short | Command | Short | Command | |
|---|---|---|---|---|
dy s |
search |
dy r |
detail (read) |
|
dy dl |
download |
dy t |
trending |
|
dy pub |
publish |
dy fav |
favorite |
|
dy cfg |
config |
dy acc |
account |
| Engine | Used for | Technology |
|---|---|---|
| API Client | Search, download, trending, live, profile | httpx + reverse-engineered API |
| Playwright | Publish, login, analytics, like, comment | Chromium browser automation |
macOS โ ย Linux โ ย Windows โ
