Skip to main content

hpkg1

CLI downloader for amateursubs.com — direct MP4 with parallel chunk download.

Install

pip install hpkg1

Usage

hpkg1                          # interactive fuzzy search picker
hpkg1 -s "kokuhaku"            # pre-filter by title
hpkg1 -s "title" --all         # download all files non-interactively
hpkg1 -q 1080p                 # only download 1080p files
hpkg1 -q best                  # best quality per episode (default)
hpkg1 -q all                   # every available quality
hpkg1 --refresh-index          # force-refresh the post list
hpkg1 --config                 # show current settings
hpkg1 --set-download-dir ~/dl  # change download directory
hpkg1 --set-threads 16         # change parallel threads
hpkg1 --set-quality 1080p      # change default quality
hpkg1 --version                # print version

How it works

  1. Loads all posts from WordPress REST API → local cache (~/.hpkg1_index.json)
  2. InquirerPy fuzzy picker to select a title
  3. Extracts direct MP4 URLs from post content:
    • Strategy 1: WP REST API content.rendered (fast)
    • Strategy 2: HTML scrape fallback (handles Presto Player posts)
    • Strategy 3: ouo.io link resolver — bypasses monetized redirect links (~65% of posts use these)
  4. Downloads with parallel Range requests for full bandwidth utilisation
  5. Resume-safe: chunks are stored in ~/.hpkg1_chunks/ keyed by URL hash — re-run to continue an interrupted download exactly where it left off

Config

Config stored at ~/.hpkg1.json:

Key Default Description
download_dir ~/hpkg1_downloads Where files are saved
threads 8 Parallel download threads
quality best Quality filter (see below)

Quality options

Value Behaviour
best Highest quality per episode (default)
all Every available file, no filtering
1080p Exact match; falls back to all if not found
720p Exact match; falls back to all if not found
576p Exact match; falls back to all if not found
480p Exact match; falls back to all if not found
2160p Exact match; falls back to all if not found

Flags reference

Flag Description
-s / --search TITLE Pre-filter titles before the fuzzy picker
-a / --all Skip the file-selection prompt and download everything
-q / --quality QUALITY Quality filter for this run
-t / --threads N Parallel threads for this run
-d / --download-dir PATH Download directory for this run
--no-ouo Skip ouo.io resolution (faster, may miss files)
--refresh-index Force-rebuild post cache and exit
--config Print current config and exit
--set-quality QUALITY Save quality default to config
--set-threads N Save threads default to config
--set-download-dir PATH Save download dir to config
--reset-config Reset config to defaults
--version / -V Print version and exit

Metadata

Release files for hpkg1 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hpkg1 0.1.0
File Size Uploaded
hpkg1-0.1.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hpkg1 0.1.0
File Interpreter ABI Platform
hpkg1-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.5 kB

Release files / hpkg1-0.1.0.tar.gz

Download URL hpkg1-0.1.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5dcd055bddbf2436e0cdcf1bc10e2efe7f52acbedced4a47fd336afdbaed3319
BLAKE2b-256 checksum
How to use checksums
4bc47e9fd845919f0b13e0669eeb9e9923a9eb072e059a1a5d0d9a8464a898e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / hpkg1-0.1.0-py3-none-any.whl

Download URL hpkg1-0.1.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfb73202d30856e1b6dd6b5c118b0357005f8b5f8c65f59da62b86b919d5e0f0
BLAKE2b-256 checksum
How to use checksums
c51445d9cbc6f7516d0ef0fe2942dc4ece9f0759992868503a5181d4ce826192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page