This script updates both yt-dlp (YouTube downloader) and gallery-dl (gallery downloader) in your SCrawler installation. It must be run from within the SCrawler directory where SCrawler.exe is located.
- Dual Tool Support: Updates both yt-dlp and gallery-dl from their official GitHub releases
- Interactive Menu: Choose which tool to update or update both at once
- Local Operation: Works from within the SCrawler directory
- Auto-Detection: Finds Environment folder automatically when run from SCrawler directory
- Versioned Backups: Creates timestamped backups before updating
- Safe Updates: Validates downloads before replacing executables
Update-SCrawler-Tools.ps1- Self-contained PowerShell script (single file solution)README-Update-SCrawler-Tools.md- This documentation
β yt-dlp is up to date!
- Current version: 2025.09.26
- Latest version: 2025.09.26
π gallery-dl update available!
- Current version: 1.30.5
- Latest version: v1.30.9
The script must be placed and run from within your SCrawler directory:
- Copy the script to your SCrawler directory (same folder as
SCrawler.exe) - Run from that location - the script expects to find:
SCrawler.exein the current directoryEnvironmentfolder withyt-dlp.exeand/orgallery-dl.exe
Directory Structure Required:
YourSCrawlerFolder/
βββ SCrawler.exe β Main application
βββ Update-SCrawler-Tools.ps1 β This script (place here)
βββ Environment/
β βββ yt-dlp.exe β YouTube downloader
β βββ gallery-dl.exe β Gallery downloader
β βββ [other tools...]
βββ [other SCrawler files...]
Works with ANY SCrawler directory name:
SCrawler_2025.9.1.0_x64βSCrawler_2025.10.5.0_x64βMySCrawlerβVideoDownloaderβSCrawler-Updatedβ- Any custom name! β
- Navigate to your SCrawler directory (where
SCrawler.exeis located) - Double-click
Update-SCrawler-Tools.ps1β Choose from menu - Or right-click β "Run with PowerShell" β Choose from menu
- Open PowerShell in your SCrawler directory
- Run one of these commands:
# Update yt-dlp only
.\Update-SCrawler-Tools.ps1 -Tool "yt-dlp"
# Update gallery-dl only
.\Update-SCrawler-Tools.ps1 -Tool "gallery-dl"
# Update both tools
.\Update-SCrawler-Tools.ps1 -Tool "both"# Force update without prompting
.\Update-SCrawler-Tools.ps1 -Tool "yt-dlp" -Force
# Run quietly (no colored output)
.\Update-SCrawler-Tools.ps1 -Tool "gallery-dl" -Quiet
# Specify custom environment path (rarely needed)
.\Update-SCrawler-Tools.ps1 -EnvironmentPath ".\Environment"powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1"The script supports several command-line parameters for advanced usage:
| Parameter | Type | Description | Example |
|---|---|---|---|
-Tool |
String | Specify which tool to update | -Tool "yt-dlp" |
-Force |
Switch | Force update without prompting | -Force |
-Quiet |
Switch | Minimal output (no colors/prompts) | -Quiet |
-EnvironmentPath |
String | Custom path to Environment folder (relative to SCrawler directory) | -EnvironmentPath ".\Environment" |
"yt-dlp"- Update YouTube downloader only"gallery-dl"- Update gallery downloader only"both"- Update both tools- (omit parameter) - Show interactive menu
# Interactive menu (recommended for most users)
.\Update-SCrawler-Tools.ps1
# Update specific tool
.\Update-SCrawler-Tools.ps1 -Tool "yt-dlp"
.\Update-SCrawler-Tools.ps1 -Tool "gallery-dl"
# Update both tools
.\Update-SCrawler-Tools.ps1 -Tool "both"# Force update without user prompts
.\Update-SCrawler-Tools.ps1 -Tool "yt-dlp" -Force
.\Update-SCrawler-Tools.ps1 -Tool "both" -Force
# Quiet mode (minimal output, no colors)
.\Update-SCrawler-Tools.ps1 -Tool "gallery-dl" -Quiet
.\Update-SCrawler-Tools.ps1 -Force -Quiet
# Custom environment path
.\Update-SCrawler-Tools.ps1 -EnvironmentPath ".\CustomEnvironment"
# Combine multiple parameters
.\Update-SCrawler-Tools.ps1 -Tool "both" -Force -Quiet# Basic execution
powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1"
# With parameters
powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1" -Tool "yt-dlp" -Force
# Quiet mode from command prompt
powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1" -Tool "both" -Force -Quiet# Batch file example (update_yt-dlp.bat)
@echo off
powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1" -Tool "yt-dlp" -Force
pause
# Scheduled task example
powershell -ExecutionPolicy Bypass -File "Update-SCrawler-Tools.ps1" -Tool "both" -Force -Quiet
# PowerShell script example
.\Update-SCrawler-Tools.ps1 -Tool "gallery-dl" -Force -Quiet
if ($LASTEXITCODE -eq 0) {
Write-Host "Gallery-dl updated successfully"
} else {
Write-Host "Update failed"
}- β Dual Tool Support: Updates both yt-dlp and gallery-dl
- β Interactive Menu: Choose which tool to update
- β Version Checking: Compares current version with latest GitHub release
- β Safe Updates: Creates backup before replacing the executable
- β Validation: Tests downloaded file before replacement
- β Error Handling: Comprehensive error messages and rollback
- β Colored Output: Easy-to-read status messages
- β Flexible Options: Force update, quiet mode, custom paths
- β Interactive: Prompts user before updating (unless -Force is used)
- Verifies Location: Ensures it's running from within a SCrawler directory (looks for SCrawler.exe)
- Shows Menu: Interactive selection of tool to update (or runs directly if -Tool specified)
- Checks Environment: Verifies the Environment folder exists
- Gets Current Version: Runs
--versionon the selected tool - Fetches Latest: Queries GitHub API for the latest release version
- Compares: Determines if an update is needed
- Updates (if needed):
- Downloads latest executable from GitHub
- Tests the downloaded file
- Creates backup of current version
- Replaces with new version
- Reports success/failure
- Versioned Backups: Current versions are backed up as
tool_backup.version.exe- Examples:
yt-dlp_backup.2025.09.26.exe,gallery-dl_backup.1_30_9.exe - Version numbers are cleaned for filenames (dots become underscores, 'v' prefix removed)
- Examples:
- Multiple Backup Retention: Each update creates a new backup, preserving previous versions
- File Validation: Downloaded files are tested before replacement
- Error Recovery: Temporary files are cleaned up on failure
- User Confirmation: Interactive prompt before updating (unless forced)
- Tool Isolation: Each tool is updated independently
The script creates versioned backups to preserve previous versions:
Backup Naming Convention:
yt-dlp_backup.YYYY.MM.DD.exe(e.g.,yt-dlp_backup.2025.09.26.exe)gallery-dl_backup.X.Y.Z.exe(e.g.,gallery-dl_backup.1_30_9.exe)
Version Cleaning Rules:
- Removes all whitespace and spaces
- Removes 'v' prefix (v1.30.9 β 1.30.9)
- Replaces dots with underscores (1.30.9 β 1_30_9)
- Replaces colons with underscores (if present)
- Removes special characters
Benefits:
- β No backup overwrites - each version is preserved
- β Easy identification of backup versions
- β Rollback capability to any previous version
- β Clean filename format (Windows compatible)
Manual Cleanup: You can safely delete old backup files when no longer needed.
The script expects the following structure:
SCrawler_2025.9.1.0_x64/
βββ Environment/
β βββ yt-dlp.exe β YouTube downloader
β βββ yt-dlp_backup.2025.09.26.exe β Versioned backup (created during update)
β βββ gallery-dl.exe β Gallery downloader
β βββ gallery-dl_backup.1.30.5.exe β Versioned backup (created during update)
β βββ ffmpeg.exe
β βββ ffplay.exe
β βββ ffprobe.exe
βββ Update-SCrawler-Tools.ps1 β Single self-contained script
βββ README-Update-SCrawler-Tools.md β This documentation
0- Success (up to date or update completed)1- Error (file not found, download failed, etc.)
- Windows PowerShell 5.1 or later
- Internet connection (for GitHub API and downloads)
- Write permissions to Environment folder
- yt-dlp.exe must be executable
Use the batch file wrapper or run with -ExecutionPolicy Bypass
Make sure you're running the script from the SCrawler root directory, or use -EnvironmentPath parameter
Check your internet connection and try again. GitHub may be temporarily unavailable.
The downloaded file may be corrupted. Try running the script again.
- Repository: https://github.com/yt-dlp/yt-dlp
- Latest Release: https://github.com/yt-dlp/yt-dlp/releases/latest
- Download URL: https://github.com/yt-dlp/yt-dlp/releases/download/{version}/yt-dlp.exe
- Repository: https://github.com/mikf/gallery-dl
- Latest Release: https://github.com/mikf/gallery-dl/releases/latest
- Download URL: https://github.com/mikf/gallery-dl/releases/download/{version}/gallery-dl.exe
This script was created to help maintain both yt-dlp and gallery-dl in the SCrawler environment. It automatically checks for updates and provides a safe way to upgrade both downloader tools.