How yanruying/douyin-downloader works
YanRuYing’s Douyin homepage batch downloader is a PyQt6 desktop app. Users provide a profile link or choose saved users, fetch a profile’s posts or liked works, review/select parsed video, image, and live-photo tasks, then download them or export work metadata to Excel. Downloads support mix/date organization and skip-existing behavior. The graph follows the visible GUI/worker/API/parser flow and README capabilities; downloader, exporter, and some dialog internals were not sampled, so their detailed wiring is limited to documented or directly indicated links.
Main entry points: worker.py Background worker · main_window.py Main window · api.py Douyin API · downloader.py Media downloader
Components 19
Desktop interaction
- Main window
douyin_downloader/gui/main_window.py - Saved users
douyin_downloader/gui/dialog_userlist.py - Background worker
douyin_downloader/gui/worker.py - Settings dialog
douyin_downloader/gui/dialog_settings.py - Cookie dialog
douyin_downloader/gui/dialog_cookie.py - Login browser
douyin_downloader/gui/dialog_browser.py
Profile and collection
- Douyin API
douyin_downloader/core/api.py - Request signing
douyin_downloader/core/abogus.py
Media processing
- Aweme task parser
douyin_downloader/core/parser.py - Media downloader
douyin_downloader/core/downloader.py - Downloaded files
- Path and filename utilities
douyin_downloader/utils/file_utils.py - Excel exporter
douyin_downloader/core/exporter.py - Excel workbooks
Settings and outputs
- Configuration
douyin_downloader/utils/config.py - INI configuration
Other components
- Desktop user
- Douyin service
- Web browser
Connections 26
- Desktop user → Main window: enters links
- Main window → Saved users: opens saved users
- Saved users → Configuration: loads/saves users
- Main window → Background worker: starts fetch/download
- Background worker → Douyin API: requests profile and works
- Douyin API → Request signing: signs requests
- Douyin API → Douyin service: sends API requests
- Douyin service → Douyin API: returns profile and works
- Background worker → Aweme task parser: builds media tasks
- Aweme task parser → Main window: returns task lists
- Main window → Background worker: submits selected tasks
- Background worker → Media downloader: downloads tasks
- Media downloader → Path and filename utilities: builds paths
- Media downloader → Downloaded files: writes media
- Background worker → Path and filename utilities: checks existing files
- Main window → Background worker: requests Excel export
- Background worker → Excel exporter: exports work data
- Excel exporter → Excel workbooks: writes workbook
- Main window → Settings dialog: opens settings
- Settings dialog → Configuration: reads and saves settings
- Configuration → INI configuration: reads/writes INI
- Main window → Cookie dialog: opens cookie setup
- Cookie dialog → Login browser: starts login flow
- Login browser → Web browser: opens login browser
- Main window → Background worker: checks cookie status
- Background worker → Douyin API: checks account status