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 |
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hpkg1-0.1.0.tar.gz | 15.2 kB | Without provenance | Details for hpkg1-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hpkg1-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hpkg1-0.1.0-py3-none-any.whl |
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
|
Security for hpkg1 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.