Skip to main content

CLI downloader tool for hanime.tv

Project description

hanimetv2026

This CLI uses yt-dlp with a plugin for downloading videos from hanime.tv and the API for adding metadata to the files.

Python Packages Installation

Install the required Python packages using pip:

pip install hanimetv2026
pip install yt-dlp 
pip install ffmpeg
pip install --user hanime-plugin

For hanime-plugin you also need to install java Script (deno worked for me):

irm https://deno.land/install.ps1 | iex

Features

  • Batch downloading: Download multiple videos at once from a text file
  • Search functionality: Search and download videos by tag or brand
  • All videos mode: Download all videos from hanime.tv (by tags censored and uncensored)
  • Metadata support: Includes metadata and thumbnails by default
  • Poster download: Option to download posters separately
  • Download archive: Track, save and skip downloaded videos with --save-urls-dir or --save-slugs-dir as a txt file
  • Update function: Check for recent updates to already downloaded videos (only with download-archiv)

CLI Usage

Basic Modes

Command Description
hanimetv2026 --video <URL> Download a single video
hanimetv2026 --batch-file <FILE> Download all URLs from a text file
hanimetv2026 --search [--tag TAGS] [--brand BRANDS] Search and download videos by tag or brand
hanimetv2026 --all Download all videos (censored and uncensored)
hanimetv2026 --update <MODE> Check for updates to already downloaded videos

Advanced Options

usage: hanimetv2026 [-h] [--resolution RESOLUTION] [--retrys RETRYS]
                    [--sleep-time SLEEP_TIME]
                    [--downloader-args DOWNLOADER_ARGS [DOWNLOADER_ARGS ...]]
                    [--verbose] [--verbose-ffmpeg] [--poster-download]
                    [--no-thumbnail] [--no-metadata] [--no-merged-description]
                    [--title-as-filename] [--skip-unavailable-fragments]
                    [--output-dir OUTPUT_DIR] [--working-dir WORKING_DIR]
                    [--save-urls-dir SAVE_URLS_DIR]
                    [--save-slugs-dir SAVE_SLUGS_DIR] [--errors-dir ERRORS_DIR]
                    [--download-archive DOWNLOAD_ARCHIVE] [--video VIDEO]
                    [--all] [--batch-file BATCH_FILE] [--search] [--update]
                    [--only-posters] [--add-only-metadata]
                    [--continue-from-page CONTINUE_FROM_PAGE]
                    [--tags TAGS [TAGS ...]] [--brand BRAND [BRAND ...]]

Option Details

Option Description
--resolution, -R Resolution of download (default: 1080)
--retrys, -r Number of retry attempts for failed downloads (default: 2)
--sleep-time, -s Sleep time between retries
--downloader-args Additional arguments to pass to yt-dlp
--verbose, -v Enable verbose logging for video download
--poster-download Download poster image separately
--no-thumbnail Skip downloading thumbnail images
--no-metadata Skip downloading embedded metadata
--output-dir, -o Output directory for downloads
--working-dir, -w Downloads and modifys videos in Working directory, then moves it to output-dir
--save-urls-dir Path to log file for download URLs
--errors-dir Path to text file for failed downloads

Plex Library Integration

Step-by-Step Guide

  1. Download all videos with posters:

    hanimetv2026 --all --poster-download \
      --save-urls-dir "C:\Users\UserName\Downloads\downloaded_urls.txt" \
      --working-dir "Path to fast/ SSD folder" \
      --output-dir "Path to HDD, NAS, or preferred storage" \
      --errors-dir "C:\Users\UserName\Downloads\errors.txt" \
      --verbose --retrys 1 --sleep-time 20
    
  2. Install the Plex scanner plugin:

  3. Add a new movie library in Plex:

    • Select source folder (import all videos at once!)
    • Set Scanner to "Plex Movie" and Agent to "Plex Movie"
    • Disable:
      • Prefer local assets
      • Prefer local metadata
      • Thumbnail generation This step is necessary to load the posters.
  4. Unmatch matched videos

  5. Change Settings

    • Set Scanner to "Plex Movie Scanner" and Agent to "HanimeTV"
    • Disable:
      • Trailer
      • Thumbnail generation
  6. Update all metadata

    • Tags and Description will be added
  7. Split apart Duplicats

Notes for Adding New Videos

  • Later imports may have incorrect posters that need manual adjustment.
  • Posters must be selected manually but will appear automatically.

FAQ

General Questions

Q: Can this download 1080p videos without Premium? A: No, only 720p is available without a premium account.

Q: Does the hanime-plugin work in PowerShell? A: The plugin alone may not work naturally in PowerShell and cannot get metadata. You can fix the error by changing the enviroment before:

$env:PYTHONUTF8 = "1"; $env:PYTHONIOENCODING="utf-8"    

Troubleshooting

Q: What should I do if downloads fail? A: Check the errors directory for failed URLs. You can retry specific videos or adjust the retry settings with --retrys and --sleep-time. You can also rerun only the failed downloads by running the error.txt with --bath-file again

Q: How can I update already downloaded videos? A: Use the --update mode along with either --save-urls-dir or --save-slugs-dir.

Examples

Basic Video Download

Download a single video with default settings:

hanimetv2026 --video "https://hanime.tv/videos/hentai/slug"
hanimetv2026 --video "https://hanime.tv/videos/hentai/slug" --output-dir "C:\downloads" --poster-download

Batch Download from File

Download multiple videos listed in a text file:

hanimetv2026 --batch-file "C:\downloads\urls.txt" \
  --output-dir "D:\Hentai Collection" \
  --errors-dir "C:\downloads\errors.txt"

hanimetv2026 --batch-file "C:\downloads\errors.txt" \
  --output-dir "D:\Hentai Collection" \
  --errors-dir "C:\downloads\errors2.txt" 

Search and Download by Tag

Download all videos with specific tags:

hanimetv2026 --search --tags "bondage" "cosplay" \
  --working-dir "C:fastFolder" \
  --output-dir "D:\Hentai\bondage-and-cosplay \
  --continue-from-page 5 \
  --save-urls-dir "C:\downloads\bondage-and-cosplay.txt"

Update Existing Collection

Check for new videos in an existing collection:

hanimetv2026 --update -all \
  --save-slugs-dir "C:\downloads\downlaoded_videos.txt" \
  --errors-dir "C:\downloads\errors2.txt" \
  --working-dir "C:fastFolder" \
  --output-dir "D:\Hentai\" \

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanimetv2026-1.1.2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hanimetv2026-1.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file hanimetv2026-1.1.2.tar.gz.

File metadata

  • Download URL: hanimetv2026-1.1.2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hanimetv2026-1.1.2.tar.gz
Algorithm Hash digest
SHA256 4dad845108a0e92ab091b2c797c1aaece228c01d2a884a9cf8c1b56a8b9c7993
MD5 d28ec51abd27da6be7cb8f19904ce324
BLAKE2b-256 d9fe804c3ef97abae6a3f3f5d367a405156e22fec6bcc0b5a50cbb60da1d2610

See more details on using hashes here.

File details

Details for the file hanimetv2026-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: hanimetv2026-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hanimetv2026-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44e7429dc7ac797a3fd9f444bdbb6cc0bf0e8519f96aff4a73e7a8c34d1fedb6
MD5 69ed31942cec039ab9478654184dcb9e
BLAKE2b-256 6898cda3c728fe81bc01fbc93cc79ed78a3ad3cc43e2a4eee3018316fd5ffc3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page