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

Download files

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

Source Distribution

hpkg1-0.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

hpkg1-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file hpkg1-0.1.0.tar.gz.

File metadata

  • Download URL: hpkg1-0.1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for hpkg1-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5dcd055bddbf2436e0cdcf1bc10e2efe7f52acbedced4a47fd336afdbaed3319
MD5 6fc3fe2af184b013b3ef7648b4f33470
BLAKE2b-256 4bc47e9fd845919f0b13e0669eeb9e9923a9eb072e059a1a5d0d9a8464a898e3

See more details on using hashes here.

File details

Details for the file hpkg1-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hpkg1-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for hpkg1-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfb73202d30856e1b6dd6b5c118b0357005f8b5f8c65f59da62b86b919d5e0f0
MD5 d97c5b7a4cc0d005a07b9ee181bf4705
BLAKE2b-256 c51445d9cbc6f7516d0ef0fe2942dc4ece9f0759992868503a5181d4ce826192

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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