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.2.9.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.2.9-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hanimetv2026-1.2.9.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.2.9.tar.gz
Algorithm Hash digest
SHA256 ff4d0863d1c3cf42efcaea809305b8209877c1911c40d8e1bb55cefa52faf3bb
MD5 11dcfb302ee3ae1740ed93c577ee96d2
BLAKE2b-256 ba40d8691379e6720d625d381bee7306be562028924a1e878d85b0af22580b19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hanimetv2026-1.2.9-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.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c779960a9553684f9822662fc84d200b2658077a103e0f5bbbfee8c378b4cc68
MD5 31b26429e8719645165b4ee6ee6cff88
BLAKE2b-256 da6ce8b77b3739a72ee0e41918b641b0dddc39101c25829c34463ae5d0e49384

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