A fast and simple downloader for BuzzHeavier and FuckingFast file hosting services
Project description
BHDownloader
A fast and simple Python downloader for BuzzHeavier and FuckingFast file hosting services.
Features
- Download files using URLs or file IDs
- Extract download links without downloading (
-l/--link-only) - Get file info (name, size, type) without downloading (
-i/--info) - Batch processing from a file containing multiple links
- Parallel operations for faster batch processing (
-p N) - JSON output for easy scripting and automation (
-j/--json) - Progress bar with download statistics
- Python API for integration into your projects
- Cross-platform (Windows, macOS, Linux)
Supported Domains
buzzheavier.combzzhr.cofuckingfast.netfuckingfast.co
Installation
pip install bhdownloader
Quick Start
# Download a file
bhdownloader https://fuckingfast.net/abc123xyz456
# Get download link only (no download)
bhdownloader -l https://fuckingfast.net/abc123xyz456
# Get file info
bhdownloader -i https://fuckingfast.net/abc123xyz456
Command-Line Usage
Download Files
# Download using full URL
bhdownloader https://fuckingfast.net/abc123xyz456
# Download using just the file ID
bhdownloader abc123xyz456
# Download to a specific directory
bhdownloader abc123xyz456 -o ./downloads
# Short alias
bhd abc123xyz456
Get Download Links (No Download)
Extract direct download links without actually downloading the files:
# Get link for a single file
bhdownloader -l https://fuckingfast.net/abc123xyz456
# Output: https://trashbytes.net/d/abc123xyz456?v=...
# Get links for multiple files and save to a file
bhdownloader -l -f urls.txt -O links.txt
# Get links in JSON format
bhdownloader -l -f urls.txt --json
# Get links in parallel (faster for many files)
bhdownloader -l -f urls.txt -p 5 --json > links.json
Get File Information
View file metadata without downloading:
# Get info for a single file
bhdownloader -i https://fuckingfast.net/abc123xyz456
# Output:
# Filename: myfile.zip
# File ID: abc123xyz456
# Page URL: https://fuckingfast.net/abc123xyz456
# Download URL: https://trashbytes.net/d/abc123xyz456?v=...
# Size: 1.23 MB
# Content-Type: application/zip
# Available: Yes
# Get info in JSON format
bhdownloader -i abc123xyz456 --json
# Get info for multiple files
bhdownloader -i -f urls.txt --json
Batch Operations
Create a text file with one URL or ID per line:
# urls.txt - Lines starting with # are ignored
https://fuckingfast.net/abc123xyz456
https://buzzheavier.com/def789ghi012
jkl345mno678
Then process the batch:
# Download all files
bhdownloader -f urls.txt -o ./downloads
# Download with 3 parallel connections
bhdownloader -f urls.txt -o ./downloads -p 3
# Extract all links
bhdownloader -l -f urls.txt -O links.txt
# Get info for all files
bhdownloader -i -f urls.txt --json > info.json
All CLI Options
Usage: bhdownloader [OPTIONS] [URL]
Mode options (default: download):
-l, --link-only Get direct download link(s) without downloading
-i, --info Show file information without downloading
Input options:
URL URL or file ID to process
-f, --file FILE File containing URLs or IDs (one per line)
Output options:
-o, --output-dir DIR Output directory for downloads (default: current)
-O, --output-file FILE Output file for links (use with -l)
-j, --json Output results in JSON format (use with -l or -i)
Processing options:
-p, --parallel N Number of parallel operations (default: 1)
-t, --timeout SECS Request timeout in seconds (default: 30)
Display options:
-q, --quiet Suppress output except errors
-v, --verbose Enable verbose/debug output
--no-banner Don't show the banner
Other:
-V, --version Show version and exit
-h, --help Show help message and exit
Python API
Basic Usage
from bhdownloader import download, get_file_info, get_download_link
# Download a file
download("https://fuckingfast.net/abc123xyz456")
download("abc123xyz456", output_dir="./downloads")
# Get download link without downloading
url = resolve_url("abc123xyz456")
download_url, filename = get_download_link(url)
print(f"Link: {download_url}")
# Get comprehensive file info
info = get_file_info("abc123xyz456")
print(f"Filename: {info.filename}")
print(f"Size: {info.size_formatted}")
print(f"Download URL: {info.download_url}")
FileInfo Object
The get_file_info() function returns a FileInfo object with these attributes:
from bhdownloader import get_file_info, FileInfo
info: FileInfo = get_file_info("abc123xyz456")
info.filename # Original filename (e.g., "myfile.zip")
info.file_id # File ID (e.g., "abc123xyz456")
info.page_url # Page URL (e.g., "https://buzzheavier.com/abc123xyz456")
info.download_url # Direct download URL (time-limited)
info.size # File size in bytes (or None)
info.size_formatted # Human-readable size (e.g., "1.23 MB")
info.content_type # MIME type (e.g., "application/zip")
info.is_available # True if file exists and is downloadable
info.error # Error message if not available
# Convert to dictionary (useful for JSON serialization)
data = info.to_dict()
# Pretty print
print(info)
Batch Operations
from bhdownloader import get_file_info, get_multiple_file_info
# Get info for multiple files
urls = ["abc123xyz456", "def789ghi012", "jkl345mno678"]
infos = get_multiple_file_info(urls)
for info in infos:
if info.is_available:
print(f"{info.filename}: {info.download_url}")
else:
print(f"{info.file_id}: {info.error}")
Download with Options
from bhdownloader import download
# Download with all options
result = download(
input_str="abc123xyz456",
output_dir="./downloads",
output_filename="custom_name.zip", # Optional: rename file
timeout=60, # Request timeout
show_progress=True, # Show progress bar
quiet=False, # Print status messages
)
print(f"Downloaded to: {result}")
# Download with custom progress callback
def my_progress(downloaded: int, total: int):
percent = (downloaded / total) * 100 if total else 0
print(f"\rProgress: {percent:.1f}%", end="", flush=True)
download(
"abc123xyz456",
show_progress=False,
progress_callback=my_progress,
)
Error Handling
from bhdownloader import download, get_file_info
from bhdownloader import (
BHDownloaderError, # Base exception
InvalidURLError, # Invalid URL or file ID
DownloadError, # Download failed
FileNotFoundError, # File not found or expired
)
try:
download("abc123xyz456")
except InvalidURLError as e:
print(f"Invalid URL or ID: {e}")
except FileNotFoundError as e:
print(f"File not found or expired: {e}")
except DownloadError as e:
print(f"Download failed: {e}")
except BHDownloaderError as e:
print(f"General error: {e}")
# Or use get_file_info which doesn't raise for unavailable files
info = get_file_info("abc123xyz456")
if not info.is_available:
print(f"File unavailable: {info.error}")
URL Resolution
from bhdownloader import resolve_url, VALID_DOMAINS
# Convert file ID to full URL
url = resolve_url("abc123xyz456")
# Returns: "https://buzzheavier.com/abc123xyz456"
# Full URLs are validated and returned as-is
url = resolve_url("https://fuckingfast.net/abc123xyz456")
# Returns: "https://fuckingfast.net/abc123xyz456"
# See supported domains
print(VALID_DOMAINS)
# ['buzzheavier.com', 'bzzhr.co', 'fuckingfast.net', 'fuckingfast.co']
API Reference
Functions
| Function | Description |
|---|---|
download(input_str, **kwargs) |
Download a file |
get_file_info(input_str, timeout, fetch_size) |
Get file metadata |
get_multiple_file_info(inputs, timeout, fetch_size) |
Get metadata for multiple files |
get_download_link(url, timeout, session) |
Get direct download URL and filename |
resolve_url(input_str) |
Convert ID to full URL |
download_file(url, output_path, **kwargs) |
Download from direct URL |
Classes
| Class | Description |
|---|---|
FileInfo |
Dataclass containing file metadata |
Exceptions
| Exception | Description |
|---|---|
BHDownloaderError |
Base exception for all errors |
InvalidURLError |
Invalid URL or file ID |
DownloadError |
Download operation failed |
FileNotFoundError |
File not found or expired |
Constants
| Constant | Value | Description |
|---|---|---|
VALID_DOMAINS |
[...] |
List of supported domains |
DEFAULT_TIMEOUT |
30 |
Default request timeout (seconds) |
DEFAULT_CHUNK_SIZE |
8192 |
Default download chunk size (bytes) |
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
v1.1.0
- Added
-l/--link-onlymode to extract download links without downloading - Added
-i/--infomode to view file information - Added
-j/--jsonflag for JSON output - Added
-O/--output-fileoption to save links to a file - Added
get_file_info()andget_multiple_file_info()functions - Added
FileInfodataclass with file metadata - Improved error handling and user feedback
- Better parallel processing support
v1.0.0
- Initial release
- Basic download functionality
- Batch download support
- Parallel downloads
- Python API
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 bhdownloader-1.1.0.tar.gz.
File metadata
- Download URL: bhdownloader-1.1.0.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
829fb0f71984f0d2fe24d6efb47e5e922b4f18afe15427d4135d97e2c19f3af5
|
|
| MD5 |
84c08795d24169521f4bf31e68622441
|
|
| BLAKE2b-256 |
804f909477cb17617e2257ee37b2a487fe1ff37fae1fd9c7477e854d7fb86c5c
|
File details
Details for the file bhdownloader-1.1.0-py3-none-any.whl.
File metadata
- Download URL: bhdownloader-1.1.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a37a23bcd3c245fc53e5f6aecc01f709b1bf4f42e234e4223e4eeb38540cceb5
|
|
| MD5 |
99f4bcc7a07a0175a2f58b0bde475f96
|
|
| BLAKE2b-256 |
33eacaef60a63fedf5b7b8d57bbebcb0127ae219eaf38735ded497d25c30f1fb
|