Repository template for Python projects
Project description
🎥 A specialized YouTube channel downloader for archiving 戶晨風 (HCF) streams and videos. Download entire channels or individual videos with ease.
Other Languages: English | 繁體中文 | 简体中文
✨ Features
- 🎬 YouTube Channel Downloader: Download all videos from 戶晨風's YouTube channel
- 🔄 High Quality Downloads: Support for multiple quality options (best, high, medium, low)
- 📦 Modern Python Stack: Built with Pydantic, yt-dlp, and Rich for robust functionality
- 🎯 Simple CLI: Easy-to-use command-line interface powered by Python Fire
- 🔁 Retry Mechanism: Automatic retries for failed downloads
- 📁 Organized Output: Videos saved to customizable download folders
- 🎨 Rich Progress Display: Beautiful terminal output with Rich library
- 🌐 Multi-site Support: Works with YouTube, Bilibili, and other video platforms
🚀 Quick Start
Prerequisites
- Python 3.11–3.14
uv(install withmake uv-install)
Installation
# Install uv (if not already installed)
make uv-install
# Install dependencies
uv sync
Basic Usage
Download a single video:
# Download with default settings (best quality)
uv run hcf_downloader --url="https://www.youtube.com/watch?v=VIDEO_ID"
# Specify quality
uv run hcf_downloader --url="https://www.youtube.com/watch?v=VIDEO_ID" --quality="high"
Or use the CLI entry point:
# After installation
hcf_downloader --url="https://www.youtube.com/watch?v=VIDEO_ID"
Advanced Usage
from hcf_downloader.cli import VideoDownloader
# Initialize downloader
downloader = VideoDownloader(output_folder="./my_downloads", max_retries=5)
# Download a video
title, filepath = downloader.download(
url="https://www.youtube.com/watch?v=VIDEO_ID",
quality="best", # Options: best, high, medium, low
)
print(f"Downloaded: {title} to {filepath}")
🧰 Commands Reference
# Development
make help # List available make targets
make clean # Clean caches and artifacts
make format # Run all pre-commit hooks
make test # Run pytest
# Dependencies (via uv)
make uv-install # Install uv on your system
uv add <pkg> # Add production dependency
uv sync # Install all dependencies
📝 Quality Settings
HCFDownloader supports multiple quality presets:
- best: Best available video and audio quality (default)
- high: Up to 1080p at 60fps
- medium: Up to 720p at 60fps
- low: Up to 480p
🛠️ Development
Setting up development environment
# Install development dependencies
uv sync --group dev
# Install pre-commit hooks
uv tool install pre-commit
make format
# Run tests
make test
📦 Project Structure
hcf_downloader/
├── src/
│ └── hcf_downloader/
│ ├── __init__.py
│ └── cli.py # Main CLI and downloader logic
├── tests/
│ └── test_hello.py
├── pyproject.toml # Project configuration
└── README.md
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with yt-dlp for robust video downloading
- Uses Pydantic for data validation
- Terminal UI powered by Rich
- CLI interface via Python Fire
🎯 About HCF (戶晨風)
This tool is specifically designed to archive content from 戶晨風's YouTube channel. It supports downloading:
- Live streams
- Regular videos
- Entire channel archives
⚙️ Configuration
You can customize the downloader behavior:
from hcf_downloader.cli import VideoDownloader
downloader = VideoDownloader(
output_folder="./my_custom_folder", # Custom download location
max_retries=10, # Increase retry attempts
)
� Technical Details
Built with modern Python best practices:
- Type-hinted code with Pydantic models
- Robust error handling and retry mechanisms
- Beautiful terminal output with Rich
- Configurable quality settings
- Support for multiple video platforms
- Builds multi-platform executables (via PyInstaller):
- macOS (ARM64, x64)
- Linux (x64 GNU, ARM64 GNU)
- Windows (x64, ARM64)
- Builds Python package (wheel & sdist)
- Automatically publishes to PyPI (requires
UV_PUBLISH_TOKENsecret) - Uploads all artifacts to GitHub Release
- Builds multi-platform executables (via PyInstaller):
📚 Documentation
For more detailed information:
- Check out the project homepage
- Visit the GitHub repository
❓ FAQ
Q: Can I download playlists? A: Currently, the tool is set to download individual videos. Playlist support may be added in future versions.
Q: What video formats are supported? A: The tool outputs MP4 files by default, which are compatible with most media players.
Q: How do I stop a download?
A: Press Ctrl+C to cancel the current download.
Q: Can I use this for other YouTube channels? A: Yes! While designed for 戶晨風's channel, this tool works with any YouTube video or channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hcf_downloader-0.0.0.tar.gz.
File metadata
- Download URL: hcf_downloader-0.0.0.tar.gz
- Upload date:
- Size: 114.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b16be9c9b3ce0feceeba5b1401015e7ea330e481a1dbfe5ccad5934dfa6c69
|
|
| MD5 |
09293a535a51864bb377caafb2f59edd
|
|
| BLAKE2b-256 |
84dee1457c556040df71862be60859e9b3a51efc4a6dc8e03894880c4bfb96d2
|
File details
Details for the file hcf_downloader-0.0.0-py3-none-any.whl.
File metadata
- Download URL: hcf_downloader-0.0.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
052d7811e611ed2657c44b40823c397542c52acb4478dca6cedcb7a973b61ef7
|
|
| MD5 |
9cf77009b71fafaf946b2668b6b03668
|
|
| BLAKE2b-256 |
26968ceec5e9f966cb6ccaa661e9b6bd0ac939ced5d4c6e861b7b949b6f6d68f
|