Skip to content
momo0338Public

About

๐ŸŽฌ AI-powered Douyin (ๆŠ–้Ÿณ) CLI โ€” search, download, publish, trending, live, analytics

Resources

Stars

0 stars

Watchers

0 watching

Forks

ย 
ย 

Latest commit

ย 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ 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

pip install dy-cli

Or from source:

git clone https://github.com/Youhai020616/douyin.git
cd douyin && bash setup.sh

Quick Start

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

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

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

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

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

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

dy me                                    # My login info
dy profile SEC_USER_ID --posts           # User profile + posts
dy analytics                             # Creator dashboard
dy notifications                         # Messages

Account & Config

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

About

๐ŸŽฌ AI-powered Douyin (ๆŠ–้Ÿณ) CLI โ€” search, download, publish, trending, live, analytics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages