A modern, standalone desktop application for downloading anime episodes from animepahe.si. Built with Flask backend and PyWebView frontend, featuring intelligent file naming and automated browser driver management.
- π₯οΈ Desktop Application: Native desktop window using PyWebView - no browser required
- π¨ Modern UI/UX: Beautiful, responsive design with gradient backgrounds and smooth animations
- π± Mobile-Friendly: Fully responsive design that works on all devices
- π― Smart Episode Selection: Visual episode cards with easy selection/deselection
- β‘ Real-time Progress: Live progress tracking during downloads
- π Concurrent Downloads: Multiple episodes download simultaneously for faster processing
- π Intelligent Naming: Downloads named with anime title and episode number (e.g., "One Piece_Episode_1.mp4")
- π Auto Extension Detection: Automatically detects correct file extensions (.mp4, .mkv, .avi, etc.)
- π€ Automated Driver Management: webdriver-manager handles Chrome driver setup automatically
- π‘οΈ Bypass Protections: Uses Playwright to handle site protections
- β¨οΈ Keyboard Shortcuts: Ctrl+A to select/deselect all episodes
- πͺ Interactive Elements: Hover effects, loading states, and smooth transitions
- π¦ Single Executable: Can be packaged as a standalone .exe file
- Python 3.8 or higher
- uv package manager (recommended)
-
Clone the repository:
git clone https://github.com/al-chris/pahe-downloader.git cd pahe-downloader -
Install dependencies using uv (recommended):
uv sync uv run playwright install chromium
Or using pip:
pip install -e . python -m playwright install chromium -
Install Playwright browsers: Playwright automatically manages browser binaries for your system.
-
Start the application:
uv run main.py
Or:
python main.py
-
Desktop window opens automatically: The application will open in a native desktop window powered by PyWebView.
-
Enter anime URL:
- Copy the full URL from animepahe.si, animepahe.ru, animepahe.com, or other AnimePahe domains
- The URL field validates input and provides visual feedback
- Make sure the URL contains "/anime/" in the path
-
Select episodes:
- View all available episodes in a beautiful grid layout
- Episodes are pre-selected by default
- Click individual episodes or use "Select All" to toggle selection
- Use Ctrl+A keyboard shortcut for quick selection
-
Download:
- Click "π₯ Download Selected Episodes"
- Monitor real-time progress on the download page
- Files are saved to the
downloads/folder with proper naming
- Gradient background with anime-themed styling
- Clean form with URL validation
- Helpful usage instructions
- Responsive design for all screen sizes
- Card-based layout for easy episode browsing
- Visual selection states with smooth animations
- Episode count display
- Bulk selection controls
- Real-time progress bar
- Status messages throughout the process
- Files saved to
downloads/folder with intelligent naming - Automatic extension detection for proper file types
Downloads are automatically organized with descriptive filenames:
- Format:
{AnimeName}_Episode_{Number}.{extension} - Examples:
One Piece_Episode_1.mp4Attack on Titan_Episode_25.mkvMy Hero Academia_Episode_10.mp4
- Features:
- Anime name extracted from webpage title
- Invalid characters automatically sanitized
- Correct file extensions detected from server headers
- Supports MP4, MKV, AVI, MOV, WMV, FLV, and WebM formats
- URL Processing: Extracts anime ID and title from the provided URL
- Episode Discovery: Uses Playwright to scrape episode information and anime title
- Link Resolution: Bypasses DDoS-Guard and resolves download links
- Extension Detection: Analyzes HTTP headers to determine correct file extensions
- Intelligent Naming: Creates filenames with anime title, episode number, and proper extension
- Concurrent Downloads: Downloads multiple episodes simultaneously to
downloads/folder - Progress Tracking: Real-time updates through the desktop interface
The application includes comprehensive logging for troubleshooting:
- File:
%LOCALAPPDATA%/pahe-downloader/logs/app.log - Console: INFO level messages appear in the console during development
- Levels: DEBUG, INFO, WARNING, ERROR with timestamps
- Browser driver initialization and management
- Web scraping operations and results
- Download progress and file operations
- Error conditions and exceptions
- Episode parsing and URL resolution
If you encounter issues:
- Check the log file at
%LOCALAPPDATA%/pahe-downloader/logs/app.log - Look for ERROR or WARNING messages
- The logs include detailed information about failures and their causes
- For driver issues, logs will show Chrome version detection and driver download status
To create a single executable file for easy distribution:
# Install PyInstaller in the project environment
uv pip install pyinstaller
# Run the build script
uv run build.py# Install PyInstaller
uv pip install pyinstaller
# Run the build script
uv run build.py# Install PyInstaller
uv add pyinstaller
# Build the executable with custom icon
uv run pyinstaller --onefile --hidden-import=webdriver_manager --hidden-import=playwright --hidden-import=webview --hidden-import=webview.platforms.winforms --hidden-import=clr --hidden-import=pythonnet --hidden-import=flask --hidden-import=beautifulsoup4 --hidden-import=lxml --hidden-import=requests --hidden-import=urllib3 --name=pahe-downloader --clean --noconsole --icon=static/icon.ico main.pyThe executable will be created in the dist/ folder as pahe-downloader.exe with the custom application icon.
When you create a new release on GitHub, the CI/CD pipeline will automatically:
- Build the executable using PyInstaller
- Generate a SHA256 checksum for verification
- Upload both files as release assets
Users can then download the standalone executable and run it without installing Python or any dependencies.
The project includes automated CI/CD that builds releases:
- Trigger: Creating a new release on GitHub automatically starts the build process
- Platform: Windows executables (built on
windows-latestrunners) - Artifacts:
pahe-downloader-playwright.exe- The standalone executable with custom iconpahe-downloader-playwright.exe.sha256- SHA256 checksum for verification
- Manual Trigger: You can also trigger builds manually using the "Run workflow" button
This application is intended for personal use only. Downloading copyrighted content without permission may violate copyright laws and terms of service. Use at your own risk. The developers are not responsible for any misuse.
- Backend: Flask web framework running locally
- Frontend: PyWebView desktop application wrapper
- Web Scraping: Playwright with automated browser management
- Browser Management: Playwright handles cross-platform browser setup
- File Handling: Dynamic extension detection and intelligent naming
- Styling: Custom CSS with modern design principles
- Icons: Unicode emojis for lightweight iconography
- Packaging: PyInstaller-ready for single executable distribution
This project is provided as-is without any warranty. See individual dependencies for their respective licenses.