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
- Loads all posts from WordPress REST API → local cache (
~/.hpkg1_index.json) - InquirerPy fuzzy picker to select a title
- 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)
- Strategy 1: WP REST API
- Downloads with parallel Range requests for full bandwidth utilisation
- 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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hpkg1-0.1.0-py3-none-any.whl
(16.3 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dcd055bddbf2436e0cdcf1bc10e2efe7f52acbedced4a47fd336afdbaed3319
|
|
| MD5 |
6fc3fe2af184b013b3ef7648b4f33470
|
|
| BLAKE2b-256 |
4bc47e9fd845919f0b13e0669eeb9e9923a9eb072e059a1a5d0d9a8464a898e3
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfb73202d30856e1b6dd6b5c118b0357005f8b5f8c65f59da62b86b919d5e0f0
|
|
| MD5 |
d97c5b7a4cc0d005a07b9ee181bf4705
|
|
| BLAKE2b-256 |
c51445d9cbc6f7516d0ef0fe2942dc4ece9f0759992868503a5181d4ce826192
|