CLI
Megaloader is a yet another command-line tool that downloads files from public share links. It's a thin wrapper around the core megaloader library.
Installation
pip install megaloaderuv add megaloaderVerify it works:
megaloader --versionuv run megaloader --versionYou can also download pre-built binaries from the release page.
Commands
The CLI provides extract for previewing, download for downloading, and plugins to list supported platforms.
extract
Preview files without downloading:
megaloader extract "https://pixeldrain.com/l/DDGtvvTU"Output
✓ Using plugin: PixelDrain
Extracting metadata... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Found 6 files:
01. sample-image-01.jpg
Size: 0.20 MB
02. sample-image-02.jpg
Size: 0.39 MB
03. sample-image-03.jpg
Size: 0.27 MB
04. sample-image-04.jpg
Size: 0.39 MB
05. sample-image-05.jpg
Size: 0.19 MB
06. sample-image-06.jpg
Size: 0.08 MBGet structured JSON output for automation:
megaloader extract "https://pixeldrain.com/l/DDGtvvTU" --jsonOutput
{
"source": "https://pixeldrain.com/l/DDGtvvTU",
"count": 6,
"items": [
{
"download_url": "https://pixeldrain.com/api/file/WnQte6cf",
"filename": "sample-image-01.jpg",
"collection_name": null,
"source_id": "WnQte6cf",
"headers": {},
"size_bytes": 207558
}
]
}JSON output is great for automation and plays nicely with tools like jq. You can read more about that in the JSON output for automation section.
Enable debug logging to see what's happening under the hood:
megaloader extract "https://pixeldrain.com/l/DDGtvvTU" --verbosedownload
Download files:
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./my-downloadsThe output directory defaults to ./downloads:
megaloader download "https://pixeldrain.com/l/DDGtvvTU"By default, files are organized into subfolders by collection name. Use --flat to disable this:
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./downloads --flatFilter files by pattern:
# Only JPG files
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./images --filter "*.jpg"
# Only MP4 videos
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./videos --filter "*.mp4"The filter uses glob patterns, so you can match by filename prefix, suffix, or any pattern.
Provide a password for protected content:
megaloader download "https://gofile.io/d/abc123" ./downloads --password "secret"plugins
Lists all supported domains and their associated plugin names.
megaloader pluginsOutput
Supported Platforms:
• bunkr.is (Bunkr)
• bunkr.la (Bunkr)
• bunkr.ru (Bunkr)
• bunkr.si (Bunkr)
• bunkr.su (Bunkr)
• cyberdrop.cr (Cyberdrop)
• cyberdrop.me (Cyberdrop)
• cyberdrop.to (Cyberdrop)
• fanbox.cc (Fanbox)
• fapello.com (Fapello)
• gofile.io (Gofile)
• pixeldrain.com (PixelDrain)
• pixiv.net (Pixiv)
• rule34.xxx (Rule34)
• thothub.ch (ThothubTO)
• thothub.to (ThothubTO)
• thothub.vip (ThothubVIP)
• thotslife.com (Thotslife)Global options
These work with all commands:
megaloader --version # Show version
megaloader --help # Show help
megaloader extract --help # Help for specific commandCommon workflows
Preview before downloading:
Check what's available first:
bashmegaloader extract "https://pixeldrain.com/l/DDGtvvTU"Looks good? Download it
bashmegaloader download "https://pixeldrain.com/l/DDGtvvTU" ./downloads
Check platform support:
megaloader plugins | grep pixeldrainmegaloader plugins | Select-String pixeldrainCustom organization:
# Organized by collection (default)
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./downloads
# Everything in one folder
megaloader download "https://pixeldrain.com/l/DDGtvvTU" ./downloads --flatFor advanced automation workflows including JSON processing with jq, shell scripting patterns, and integration with external tools, see CLI automation.
Filtering downloads
Download specific file types:
# Only images
megaloader download --filter "*.jpg" "https://pixeldrain.com/l/DDGtvvTU" ./images
# Only videos
megaloader download --filter "*.mp4" "https://pixeldrain.com/l/DDGtvvTU" ./videosFilter by filename pattern:
# Files starting with "sample"
megaloader download --filter "sample*" "https://pixeldrain.com/l/DDGtvvTU" ./sample
# Files containing "2024"
megaloader download --filter "*2024*" "https://pixeldrain.com/l/DDGtvvTU" ./2024Note that you need to run the command separately for each filter pattern. Multiple filters aren't yet supported in a single command.
Authentication
Password-protected GoFile:
megaloader download --password "secret123" "https://gofile.io/d/abc123" ./downloadsUsing environment variables:
export GOFILE_PASSWORD="secret123"
megaloader download "https://gofile.io/d/abc123" ./downloads$Env:GOFILE_PASSWORD = "secret123"
megaloader download "https://gofile.io/d/abc123" ./downloadsCommand-line takes precedence over environment variables.
For platforms requiring authentication:
export FANBOX_SESSION_ID="your_cookie"
export PIXIV_SESSION_ID="your_cookie"
export RULE34_API_KEY="your_key"
export RULE34_USER_ID="your_id"
megaloader download "https://creator.fanbox.cc" ./output$Env:FANBOX_SESSION_ID = "your_cookie"
$Env:PIXIV_SESSION_ID = "your_cookie"
$Env:RULE34_API_KEY = "your_key"
$Env:RULE34_USER_ID = "your_id"
megaloader download "https://creator.fanbox.cc" ./outputSee the plugin options reference for authentication details.
When to use CLI vs library
Use the CLI for quick downloads, shell scripting, or exploring URLs without writing code.
Use the library when you need custom download logic, programmatic processing, or application integration.
The CLI is a convenience wrapper around the core library with progress bars and organized output.