A powerful, cross-platform anime downloader for AnimePahe with advanced features
Automatic anime search, download, and management with support for parallel downloads, desktop notifications, smart caching, filtering, and comprehensive record tracking. Fully cross-platform (Windows, macOS, Linux).
- π Smart Search with year and status filters
- π¦ Batch/Season Downloads - Download entire seasons with one command
- π Parallel Downloads - Speed up with multi-threaded downloads
- π Desktop Notifications - Get notified when downloads complete (Windows/macOS/Linux)
- πΎ Smart Caching - Faster repeat searches with automatic API caching
- π Progress Tracking - Visual progress bars for multi-episode downloads
- ποΈ Record Management - Track watching progress, ratings, and status
- βοΈ Configuration System - Save your preferences in a config file
- π― Auto-Sorting - Automatically organize downloaded files
- π Cross-Platform - Works on Windows, macOS, and Linux
- π Detailed Logging - Verbose and quiet modes available
- πͺ Session Persistence - Reduced DDoS-Guard friction with cookie caching
- Python 3.8+
- Web Browser: Firefox or Chrome/Chromium
- WebDriver: geckodriver (Firefox) or chromedriver (Chrome)
pip install selenium beautifulsoup4 requests tqdm lxmlLinux (Ubuntu/Debian):
# Firefox (geckodriver)
sudo apt install firefox-geckodriver
# Chrome (chromedriver)
sudo apt install chromium-chromedrivermacOS (Homebrew):
# Firefox
brew install geckodriver
# Chrome
brew install chromedriverWindows:
- Download geckodriver or chromedriver
- Add to PATH or place in project directory
- Clone the repository:
git clone https://github.com/haxsysgit/autopahe.git
cd autopahe- Install dependencies:
pip install -r requirements.txt-
Install WebDriver (see requirements above)
-
Run the script:
python3 auto_pahe.py --help# Search for an anime
python3 auto_pahe.py -s "Naruto"
# Select and download episode 1
python3 auto_pahe.py -s "Naruto" -i 0 -d 1
# Download multiple episodes
python3 auto_pahe.py -s "Naruto" -i 0 -md "1-5"# Search for anime
python3 auto_pahe.py -s "Anime Name"
# Search with filters
python3 auto_pahe.py -s "Naruto" --year 2007 --status "Finished"
# Select anime from results (index 0 = first result)
python3 auto_pahe.py -s "Naruto" -i 0
# Download single episode
python3 auto_pahe.py -s "Naruto" -i 0 -d 1
# Download multiple episodes
python3 auto_pahe.py -s "Naruto" -i 0 -md "1-5"
python3 auto_pahe.py -s "Naruto" -i 0 -md "1,3,5-8,10"
# Download entire season (12-13 episodes)
python3 auto_pahe.py -s "Naruto" -i 0 --season 1
# Parallel downloads (use with caution)
python3 auto_pahe.py -s "Naruto" -i 0 -md "1-10" -w 2
# With desktop notifications
python3 auto_pahe.py -s "Naruto" -i 0 -md "1-5" --notify# View all records
python3 auto_pahe.py -R view
# Search records
python3 auto_pahe.py -R search "naruto"
# Update progress
python3 auto_pahe.py -R progress "Naruto" 27
# Rate anime
python3 auto_pahe.py -R rate "Naruto" 9.5
# Export records
python3 auto_pahe.py -R export backup.json json
python3 auto_pahe.py -R export records.csv csv
# Import records
python3 auto_pahe.py -R import backup.json
# Delete record
python3 auto_pahe.py -R delete "Naruto"
# List by status
python3 auto_pahe.py -R list-status completed# Sort downloaded files
python3 auto_pahe.py --sort all --sort-path ~/Downloads
# Dry run (preview changes)
python3 auto_pahe.py --sort all --sort-dry-run
# Rename only
python3 auto_pahe.py --sort rename
# Organize into folders
python3 auto_pahe.py --sort organize# View cache statistics
python3 auto_pahe.py --cache stats
# Clear cache and cookies
python3 auto_pahe.py --cache clear# Today's stats
python3 auto_pahe.py -dt "today"
# This week
python3 auto_pahe.py --summary "this week"
# All time
python3 auto_pahe.py --summary "all"
# Date range
python3 auto_pahe.py --summary "from 2025-11-01 to 2025-11-30"# 1. Search
python3 auto_pahe.py -s "One Piece"
# 2. Select (index 0 = first result)
python3 auto_pahe.py -s "One Piece" -i 0
# 3. Download episode 1
python3 auto_pahe.py -s "One Piece" -i 0 -d 1# Search with filters
python3 auto_pahe.py -s "Naruto" --year 2007 --status "Finished Airing"
# Download season 1 with notifications and parallel downloads
python3 auto_pahe.py -s "Naruto" -i 0 --season 1 -w 2 --notify
# Auto-sort after download (if configured)
# Files automatically organized into folders# After downloading, update your records
python3 auto_pahe.py -R progress "Naruto" 12
python3 auto_pahe.py -R rate "Naruto" 9.0
# Check what you're watching
python3 auto_pahe.py -R list-status "watching"
# Export for backup
python3 auto_pahe.py -R export ~/anime_backup.json json| Flag | Description |
|---|---|
-s, --search TEXT |
Search for anime by name |
-i, --index INT |
Select anime from search results |
-d, --single_download INT |
Download single episode |
-md, --multi_download TEXT |
Download multiple episodes (e.g., "1-5,7,10-12") |
-l, --link |
Display download link (no download) |
-ml, --multilinks |
Display multiple download links |
-a, --about |
Show anime overview |
| Flag | Description |
|---|---|
-b, --browser TEXT |
Browser choice (firefox|chrome) |
-p, --resolution TEXT |
Preferred resolution (480|720|1080) |
-w, --workers INT |
Parallel workers for downloads (default: 1) |
| Flag | Description |
|---|---|
--year INT |
Filter search results by release year |
--status TEXT |
Filter search results by status |
| Flag | Description |
|---|---|
--season INT |
Download entire season (e.g., --season 1 = eps 1-12) |
| Flag | Description |
|---|---|
--notify |
Enable desktop notifications on completion |
| Flag | Description |
|---|---|
-r, --record TEXT |
Basic record access (view, index, keyword) |
-R, --records ... |
Advanced management (see subcommands below) |
-R Subcommands:
view- List all recordssearch <query>- Search recordsdelete <id\|title>- Delete recordprogress <id\|title> <episode>- Update progressrate <id\|title> <0-10>- Set ratingrename <id\|title> <new_title>- Renameset-keyword <id\|title> <keyword>- Update keywordlist-status <status>- Filter by statusexport <path> [json\|csv]- Export recordsimport <path>- Import records
| Flag | Description |
|---|---|
--sort {all|rename|organize} |
Sort downloaded files |
--sort-path PATH |
Directory to sort (default: Downloads) |
--sort-dry-run |
Preview changes without applying |
| Flag | Description |
|---|---|
--cache {clear|stats} |
Manage disk cache and cookies |
| Flag | Description |
|---|---|
-dt, --execution_data TEXT |
Execution stats for periods |
--summary TEXT |
Stats + records summary |
| Flag | Description |
|---|---|
--verbose |
Enable DEBUG logging (detailed) |
--quiet |
Enable WARNING logging (minimal) |
| Flag | Description |
|---|---|
--config PATH |
Load configuration from file |
--write-config [PATH] |
Generate sample config file |
Create a config file to save your preferences:
# Generate sample config
python3 auto_pahe.py --write-config
# Edit ~/.config/autopahe/config.iniSample Configuration:
[defaults]
# Browser: firefox or chrome
browser = firefox
# Resolution: 480, 720, 1080
resolution = 1080
# Workers for parallel downloads (1 = sequential)
workers = 2
# Custom download directory (optional)
download_dir = /home/user/Videos/Anime
# Auto-sort after downloads
sort_on_complete = true
sort_mode = all
# Custom sort directory (optional)
sort_path = Config is loaded automatically from:
~/.config/autopahe/config.ini~/.autopahe.ini./autopahe.ini
Or specify custom location: --config /path/to/config.ini
- API Response Caching: 6-hour cache for faster repeat searches
- Cookie Persistence: 24-hour session cookies reduce DDoS-Guard challenges
- Auto-cleanup: Old cache entries removed automatically
- Download multiple episodes simultaneously with
-w/--workers - Safe staggering prevents port conflicts
- Warning: May trigger DDoS-Guard protection. Use
-w 1for stability.
- Visual progress bars for multi-episode downloads (requires
tqdm) - Real-time completion status
- Failed episode tracking
Get notified when downloads complete or fail:
Linux: Uses notify-send (libnotify)
sudo apt install libnotify-bin # Ubuntu/DebianmacOS: Uses AppleScript (built-in)
Windows: Uses PowerShell toast notifications (built-in)
Enable with --notify flag.
Integrates pahesort functionality:
- Rename: Clean up AnimePahe filenames
- Organize: Group episodes into anime folders
- Auto-sort: Enable in config for automatic organization
# Preview changes
python3 auto_pahe.py --sort all --sort-dry-run
# Apply sorting
python3 auto_pahe.py --sort all --sort-path ~/DownloadsControl output verbosity:
# Normal logging (INFO)
python3 auto_pahe.py -s "Naruto" -i 0 -d 1
# Verbose logging (DEBUG) - shows cache hits, API calls, etc.
python3 auto_pahe.py -s "Naruto" -i 0 -d 1 --verbose
# Quiet logging (WARNING) - errors only
python3 auto_pahe.py -s "Naruto" -i 0 -d 1 --quietLogs saved to autopahe.log in current directory.
- β Full support with Firefox or Chrome
- β Desktop notifications via PowerShell
- β Automatic driver detection
- π Install drivers to PATH or project directory
- β Full support with Firefox or Chrome
- β Desktop notifications via AppleScript
- β Homebrew driver installation
- π Use
brew install geckodriverorchromedriver
- β Full support on all distros
- β Desktop notifications via notify-send
- β Package manager driver installation
- π Tested on Ubuntu, Debian, Fedora, Arch
Detailed documentation in the repository:
- ALL_PHASES_DOCUMENTATION.txt - Complete feature guide
- CONFIG_DOCUMENTATION.txt - Configuration system details
- TESTING_GUIDE.txt - Comprehensive testing procedures
- PHASE2_CHANGES_SUMMARY.txt - Implementation changelog
- AnimePahe uses DDoS-Guard protection
- Script includes bypass mechanism (refresh + implicit wait)
- Parallel downloads may trigger protection - use cautiously
- Persistent cookies help reduce challenges
- If blocked, wait a few minutes and try again
- Default: 720p (configurable)
- Available: 480p, 720p, 1080p
- Script selects best available quality if preferred not available
- Partial downloads automatically resumed
- Uses HTTP Range headers
- Safe to interrupt and restart
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
See license.md for details.
Created by haxsys
Built with:
- AnimePahe - Anime source
- Selenium - Browser automation
- BeautifulSoup - HTML parsing
- Requests - HTTP library
- Issues: GitHub Issues
- Questions: Open a discussion or issue
- Updates: Watch the repository for new releases
Enjoy AutoPahe! π¬