π― Intelligent Bilibili Content Synchronization Tool - Automated sync management, incremental updates, and batch downloads
π¨π³ δΈζζζ‘£ | πΊπΈ English
BiliSyncer is an intelligent synchronization management tool specifically designed for continuously updating Bilibili content. It focuses on solving the automated synchronization challenges of user favorites, UP master uploads, anime series, and other continuously updating resources. Built upon yutto, it provides a complete resource management ecosystem that makes content management simple and efficient.
- Precise Resource Targeting - Automatically retrieves complete and accurate video lists from favorites, UP master uploads, etc., without omissions or redundancy
- Smart Update Detection - Automatically identifies all new content since the last sync, avoiding redundant requests and invalid operations
- Comprehensive Content Support - Full support for user videos, anime, movies, courses, favorites, collections, and more
- Incremental Sync Technology - Only synchronizes new and changed content, dramatically saving time and bandwidth
- Resume Protection - Automatically recovers from network interruptions or unexpected stops, ensuring download continuity
- Persistent Status Tracking - CSV-based progress management ensures sync records are never lost
- Smart Cleanup Function - Supports one-click cleanup of all downloaded files after backup completion, freeing storage space
- Record Retention Mechanism - Preserves complete download records while cleaning files, providing foundation for future incremental syncs
- Storage Optimization Strategy - Flexible file management strategies adapted to different storage scenarios
- Multi-Account Support - Supports independent configuration and management of multiple Bilibili accounts for different permission needs
- Differentiated Configuration - Provides independent parameter configuration schemes for different download requirements
- Configuration Templating - Preset common configuration templates for quick application to different task scenarios
- Real-Time Task Monitoring - Intuitively displays execution status and progress information of all sync tasks
- Historical Record Analysis - Automatically tracks sync history and provides detailed task execution reports
- Resource Status Overview - At-a-glance view of sync status and storage information for all resources
- Concurrent Task Management - Supports parallel execution of multiple tasks, maximizing system resource utilization
- Task Lifecycle Control - Provides complete control functions for task start, pause, stop, restart, etc.
- Priority Scheduling - Supports task priority settings to prioritize important resources
- Modern Design - Clean and beautiful responsive web interface adapted to various devices
- Operational Simplicity - Intuitive operation flow reduces learning costs and enhances user experience
- Feature Integration - All management functions centralized in a unified interface, avoiding complex command-line operations
- Batch Processing Capability - Powerful CLI support for easy script invocation and automation integration
- Parameter Flexibility - Rich command-line parameters meeting advanced users' fine-grained control needs
- Program Integration Friendly - Easy integration into other automation systems and workflows
| Feature | BiliSyncer | Yutto | Yutto-uiya |
|---|---|---|---|
| Core Purpose | Continuous sync management | Versatile CLI downloader | Simple WebUI wrapper |
| Sync Capability | β Smart incremental sync | β Manual re-execution required | β Manual re-execution required |
| Resource Management | β Complete lifecycle management | β Download-only functionality | β Download-only functionality |
| Interface Type | Professional Web Dashboard | Powerful Command Line | User-friendly Streamlit UI |
| Download Engine | Built on yutto | Original robust engine | Built on yutto |
| Batch Operations | β Multi-task management | β Batch download support | β Basic batch support |
| Resume Downloads | β Automatic detection | β Built-in resume capability | β Inherits yutto's resume |
| Status Persistence | β CSV-based tracking | β Session-based only | β Session-based only |
| Configuration | β Web + YAML management | β Rich CLI options | β Simple web forms |
| Content Organization | β Structured folder naming | β Flexible path templates | β Basic organization |
| Learning Curve | π’ Beginner-friendly | π‘ Technical users | π’ Very easy |
| Use Case | Continuous content management | Power user downloads | Casual downloading |
Yutto: The robust foundation - powerful, fast, and highly configurable CLI tool perfect for technical users who need maximum control and performance.
Yutto-uiya: The accessibility bridge - brings yutto's power to casual users through a clean, simple web interface without complexity.
BiliSyncer: The management layer - focuses on automated synchronization management of continuously updating content, providing complete resource lifecycle solutions.
# Install dependencies
pip install yutto
pip install -r requirements.txtpython start_webui.py
# Visit http://localhost:5000# Single download
python main.py "https://www.bilibili.com/video/BV1xx411c7mD"
# With additional options
python main.py "URL" --vip-strict --save-cover
# Batch update all configured tasks
python main.py --update -c "SESSDATA"
# Use custom configuration
python main.py "URL" --config vipCreate config/your_config.yaml:
name: "My Config"
output_dir: "~/Downloads"
sessdata: "your_sessdata_here"
vip_strict: true
save_cover: true
extra_args: ["--quality", "8K"]Getting SESSDATA: Login to bilibili.com β F12 β Application β Cookies β Copy SESSDATA value
tools/dir_tree_size.py is a directory size analysis tool that displays directory structure in tree format and sorts by size.
Features:
- π Tree-style Display - Shows directories and files in a tree structure
- π Smart Sorting - Sorts by size from smallest to largest for easy identification
- π Auto Check - Automatically checks video file status in leaf directories (bottom-level directories)
- π Issue Report - Automatically generates check reports listing problematic directories
Usage:
# Basic usage (automatically checks and generates report)
python3 tools/dir_tree_size.py "/path/to/directory"
# Skip checking, only show directory structure
python3 tools/dir_tree_size.py "/path/to/directory" --no-checkCheck Features:
- β
Missing mp4 Files - Detects if leaf directories are missing
.mp4files - β
m4s Files Present - Detects if
.m4sfiles exist in leaf directories (usually incomplete downloads or fragmented files)
Report Generation:
- Check reports are automatically generated in the checked directory
- Filename format:
directory_name_ζ£ζ₯ζ₯ε_timestamp.log - Report includes: List of problematic directories, specific issue types, statistics
Example Output:
/path/to/Bilibili/ (1.23 TB)
βββ ηͺε§-33415-εδΎ¦ζ’ζ―εοΌδΈι
οΌ (50.2 GB)
β βββ BV1xx411c7mD-第1ι (500 MB)
β βββ BV1xx411c7mE-第2ι (480 MB)
βββ ζΆθε€Ή-123456-ζηζΆθ (30.5 GB)
Report generated: /path/to/xxx_ζ£ζ₯ζ₯ε_20250116_123456.log
Found 5 leaf directories with issues
flatten.py is a directory flattening tool that flattens directory structures at a specified level, moving files from subdirectories to parent directories and removing empty subdirectories.
Features:
- π Level-based Flattening - Flattens directory structures at specified depth levels
- β‘ Multi-threaded Processing - Supports parallel file moving with multiple threads for faster processing
- π Preview Mode - Supports
--dry-runmode to preview operations without actually executing them - ποΈ Hidden File Handling - Option to delete or keep hidden files (files starting with
.) - π Safe Operation - Automatically handles filename conflicts to prevent file overwriting
Usage:
# Flatten level 1 directories (default: delete hidden files)
python3 flatten.py "/path/to/directory" -n 1
# Preview mode, don't actually execute operations
python3 flatten.py "/path/to/directory" -n 1 --dry-run
# Flatten level 2 directories, keep hidden files, 8 threads
python3 flatten.py "/path/to/directory" -n 2 --keep-hidden --jobs 8
# Flatten level 1, delete hidden files, 4 threads, preview mode
python3 flatten.py "/path/to/directory" -n 1 --delete-hidden --jobs 4 --dry-runParameters:
-n, --level- Level to flatten (relative to root, root depth is 0), default 0-j, --jobs- Maximum parallel threads, default 8--delete-hidden- Delete all hidden files starting with.(default behavior)--keep-hidden- Keep hidden files, don't delete--dry-run- Preview mode, only print operations to be performed, don't actually move/delete files
Use Cases:
- π¦ Simplify Directory Structure - Flatten multi-level nested directory structures for easier management
- π¬ Video File Organization - Move downloaded video files from subdirectories to main directory
- π§Ή Clean Empty Directories - Automatically remove empty subdirectories after flattening
Notes:
- Tool automatically skips hidden directories (starting with
.) to protect system directories like.git - If files with the same name exist at destination, they will be automatically renamed to
name__dup1.ext,name__dup2.ext, etc. - It's recommended to use
--dry-runmode first to preview results before actual execution
- Content Creators - Continuously track and backup latest uploads from followed UP masters
- Educators - Automatically sync course updates and educational resources
- Media Collectors - Intelligently manage updates from favorites and watchlists
- Researchers - Automate collection and organization of research-related video materials
Built with Python 3.8+, Flask, yutto, and modern web technologies for reliability and performance.
We welcome contributions! Submit Issues or Pull Requests to help improve BiliSyncer.
MIT Licensed - see LICENSE for details.
β Star this project if it helps you manage your Bilibili content!




