A Python-based tool for downloading hanime from hanime.tv. This tool reads a list of URLs from a file and processes the downloads accordingly.
- Downloads multiple files concurrently.
- Supports batch downloading via a list of URLs.
- Supports custom resolution download of episodes.
- Supports custom download location.
- Supports hanime series download.
- Tracks download progress with a progress bar.
- Automatically creates a directory structure for organized storage.
- Python 3
httpx- for HTTP requests with HTTP/1.1 & HTTP/2 supportm3u8- for parsing and generating M3U8 playlistspycryptodomex- for encryption, decryption, and other cryptographic operationsrich- for progress display in the terminal
Show directory structure
project-root/
├── helpers/
│ ├── downloaders/
│ │ ├── crawler_utils.py # Utilities for extracting media download links
│ │ └── episode_downloader.py # Utilities for managing the download process
│ ├── managers/
│ │ ├── live_manager.py # Manages a real-time live display
│ │ ├── log_manager.py # Manages real-time log updates
│ │ └── progress_manager.py # Manages progress bars
│ ├── config.py # Manages constants and settings used across the project
│ ├── file_utils.py # Utilities for managing file operations
│ └── general_utils.py # Miscellaneous utility functions
├── hanime_downloader.py # Module for initiating downloads from specified hanime.tv
├── main.py # Main script to run the downloader
└── URLs.txt # Text file listing album URLs to be downloaded
- Clone the repository:
git clone https://github.com/Lysagxra/HanimeDownloader.git- Navigate to the project directory:
cd HanimeDownloader- Install the required dependencies:
pip install -r requirements.txtTo download a single hanime episode from an URL, you can use hanime_downloader.py, running the script with a valid album URL.
python3 hanime_downloader.py <episode_url>python3 hanime_downloader.py https://hanime.tv/videos/hentai/sukebe-elf-tanbouki-1
To download all the episodes from a hanime series, you can use hanime_downloader.py, running the script with a valid album URL, and --all-episodes command-line argument:
python3 hanime_downloader.py <episode_url> --all-episodespython3 hanime_downloader.py https://hanime.tv/videos/hentai/sukebe-elf-tanbouki-2 --all-episodes
To batch download from multiple album URLs, you can use the main.py script. This script reads URLs from a file named URLs.txt and downloads each one using the album downloader.
- Create a file named
URLs.txtin the root of your project, listing each URL on a new line.
- Example of
URLs.txt:
https://hanime.tv/videos/hentai/sukebe-elf-tanbouki-1
https://hanime.tv/videos/hentai/sukebe-elf-tanbouki-2
https://hanime.tv/videos/hentai/youkoso-sukebe-elf-no-mori-e-2
- Ensure that each URL is on its own line without any extra spaces.
- You can add as many URLs as you need, following the same format.
- Run the batch download script:
python3 main.py
If the --custom-path <custom_path> argument is used, the downloaded files will be saved in <custom_path>/Downloads. Otherwise, the files will be saved in a Downloads folder created within the script's directory
python3 main.py --custom-path <custom_path>python3 main.py --custom-path /path/to/external/driveTo download an episode (or all episodes in a session) in a certain resolution, you can use the --resolution command-line argument:
python3 hanime_downloader.py <episode_url> --resolution <resolution>or
python3 main.py --resolution <resolution>python3 hanime_downloader.py https://hanime.tv/videos/hentai/sukebe-elf-tanbouki-1 --resolution 480p
If not specified, the program will automatically select 720p as the default resolution. The supported resolutions are: 360p, 480p, and 720p.
The application logs any issues encountered during the download process.
