HVBrowser
HVBrowser provides browser automation APIs for HentaiVerse. It builds on
hbrowser for the shared authenticated browser session.
The package was extracted from the historical combined hbrowser
distribution. Battle-domain APIs live in the separate hvbattle package.
Lottery and Monster Lab APIs
Lottery inspection is read-only and returns the current ticket count, shared GP balance, and the fixed 1,000 GP ticket price. Purchasing requires an explicit lottery kind and positive quantity, then verifies the exact ticket increase and GP decrease before returning:
from hvbrowser import LotteryClient, LotteryKind
client = LotteryClient(driver)
snapshot = await client.inspect(LotteryKind.WEAPON)
report = await client.purchase(
LotteryKind.WEAPON,
25,
expected_before=snapshot,
)
The optional snapshot is an optimistic precondition: if tickets, GP, lottery kind, or price changed after planning, the client raises before touching the purchase form.
Target counts, Weapon-versus-Armor priority, and behavior when GP is limited are
application policy and intentionally do not belong in this package. The legacy
HVDriver.loetterycheck() spelling remains as a compatibility wrapper.
Monster Lab exposes the two known feed-all resources explicitly:
from hvbrowser import MonsterLabClient, MonsterLabFeed
client = MonsterLabClient(driver)
snapshot = await client.inspect()
food_report = await client.feed_all(MonsterLabFeed.FOOD)
drugs_report = await client.feed_all(MonsterLabFeed.DRUGS)
After the Monster Lab API is confirmed, an action image that is not present is reported as unavailable and produces no mutation. The selector and post-submission disappearance semantics still require a read-only live selector check and a separately authorized mutation check, respectively. Missing page structure, unknown submission outcomes, and unstable/failed post-submit confirmation raise typed errors. Both purchase and feed-all calls change account state; automated package tests use only offline fakes.
Development
Build a clean environment backed by the PyPI release of hbrowser:
bash scripts/rebuild-env.sh
For coordinated local development, overlay the clean environment manually:
uv pip install --python .venv/bin/python --reinstall --no-deps --editable \
/Users/kuanlun_wang/Desktop/git-repo/hbrowser.clone
Commands that must preserve this editable overlay use uv run --no-sync.
Read-only Market inspection
Market inspection and sale planning are non-mutating by default:
import asyncio
from hvbrowser import HVDriver, SellItems
async def main() -> None:
async with HVDriver(headless=True) as driver:
snapshot = await driver.inspect_market()
plan = await driver.marketcheck(SellItems(materials=["Low-Grade Metals"]))
print(len(snapshot.items), plan.total_units)
asyncio.run(main())
The compatibility marketcheck() call requires commit=True before it can
request submission. Submission is currently blocked by a fail-closed runtime
gate until the current quote selector and pricing semantics have been confirmed
with the read-only live probe. The guarded implementation never deposits
credits and never re-lists unrelated orders.
Guarded live smoke test
The surrounding hentaiverse workspace owns account selection. This smoke
probe only refuses to construct a browser unless credentials are supplied
indirectly through the environment. It stops when an active battle is detected
and contains no state-changing purchase, feed-all, submit, repair, recovery, or
battle call. It does use navigation clicks to reach the requested read-only
pages:
uv run --no-sync python scripts/live_readonly_smoke.py \
--skip-market \
--inspect-lotteries \
--inspect-monster-lab
--skip-market lets the two new selectors be checked independently while the
Market integration is unavailable. The last two flags only inspect counts and
action availability. They never call the Lottery purchase form or
do_feed_all.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file hvbrowser-0.1.2.tar.gz.
File metadata
- Download URL: hvbrowser-0.1.2.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
572954b02ff6d597c50bec9eb955f526322c4a2e765d36b3a481ed27309eaa47
|
|
| MD5 |
da27ad78b37dfb22612d348e1a247f7c
|
|
| BLAKE2b-256 |
50dd3f98c42fcc1bf9e6a27557717c6b6840b50f30829627bd6ddedeeeeff074
|
Provenance
The following attestation bundles were made for hvbrowser-0.1.2.tar.gz:
Publisher:
publish.yml on Kuan-Lun/hvbrowser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hvbrowser-0.1.2.tar.gz -
Subject digest:
572954b02ff6d597c50bec9eb955f526322c4a2e765d36b3a481ed27309eaa47 - Sigstore transparency entry: 2325884095
- Sigstore integration time:
-
Permalink:
Kuan-Lun/hvbrowser@02ab36fb246095f422c201b432fcd70aa6137f4f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kuan-Lun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02ab36fb246095f422c201b432fcd70aa6137f4f -
Trigger Event:
push
-
Statement type:
File details
Details for the file hvbrowser-0.1.2-py3-none-any.whl.
File metadata
- Download URL: hvbrowser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fb70863f41850361a8b57c911ddd5ce9962c7098b98924e635b51fd8ff7c80d
|
|
| MD5 |
7846dee6b59f35f5469640a5aff3528c
|
|
| BLAKE2b-256 |
b7a790fe1246ac26fd6e1e719a42199dd0c7a852f297ed6305d3861a5a4c7d3c
|
Provenance
The following attestation bundles were made for hvbrowser-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Kuan-Lun/hvbrowser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hvbrowser-0.1.2-py3-none-any.whl -
Subject digest:
0fb70863f41850361a8b57c911ddd5ce9962c7098b98924e635b51fd8ff7c80d - Sigstore transparency entry: 2325884169
- Sigstore integration time:
-
Permalink:
Kuan-Lun/hvbrowser@02ab36fb246095f422c201b432fcd70aa6137f4f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Kuan-Lun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02ab36fb246095f422c201b432fcd70aa6137f4f -
Trigger Event:
push
-
Statement type: