# douyin
**Repository Path**: zbgit11/douyin
## Basic Information
- **Project Name**: douyin
- **Description**: ๐ฌ AI-powered Douyin (ๆ้ณ) CLI โ search, download, publish, trending, live, analytics
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-07-06
- **Last Updated**: 2026-07-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
๐ฌ dy-cli
Douyin (ๆ้ณ/TikTok China) CLI โ search, download, publish, trending, live, and more.
Install โข
Quick Start โข
Commands โข
Features โข
License
---
## Install
```bash
pip install dy-cli
```
Or from source:
```bash
git clone https://github.com/Youhai020616/douyin.git
cd douyin && bash setup.sh
```
## Quick Start
```bash
dy 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
```
## Features
- ๐ **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
## Commands
### Search & Read
```bash
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)
```
### Download
```bash
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 posts
```
### Trending & Live
```bash
dy 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 ffmpeg
```
### Publish
```bash
dy 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 only
```
### Interact
```bash
dy 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 user
```
### Profile & Analytics
```bash
dy me # My login info
dy profile SEC_USER_ID --posts # User profile + posts
dy analytics # Creator dashboard
dy notifications # Messages
```
### Account & Config
```bash
dy 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
```
### Aliases
| 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` |
## Architecture
| Engine | Used for | Technology |
|--------|----------|------------|
| **API Client** | Search, download, trending, live, profile | httpx + reverse-engineered API |
| **Playwright** | Publish, login, analytics, like, comment | Chromium browser automation |
## Platform Support
macOS โ
Linux โ
Windows โ
## License
[MIT](./LICENSE)
## ๐ Ecosystem
| Project | Description |
|---------|-------------|
| [AgentMind](https://github.com/Youhai020616/Agentmind) | Self-learning memory system for AI agents |
| [stealth-cli](https://github.com/Youhai020616/stealth-cli) | Anti-detection browser CLI powered by Camoufox |
| [stealth-x](https://github.com/Youhai020616/stealth-x) | Stealth X/Twitter automation |
| [xiaohongshu](https://github.com/Youhai020616/xiaohongshu) | Xiaohongshu automation |
| [freepost](https://github.com/Youhai020616/freepost-saas) | AI social media management |