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

PyPI CI Python License

Install โ€ข Quick Start โ€ข Commands โ€ข Features โ€ข License

---

dy-cli demo

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