Skip to main content

Lightweight tool for querying Online Judge statistics across multiple platforms

Project description

OJHunt Lite

A lightweight async Python tool for querying Online Judge (OJ) statistics across multiple platforms. Track your accepted problems and total submissions from competitive programming sites.

  • Async/concurrent requests via aiohttp
  • CLI and web interface
  • Self-contained crawlers — each file can be used independently
  • BSD-2 Licensed

CLI

Install once, use anywhere (pipx, uv tool, or pip):

pipx install ojhunt
# or: uv tool install ojhunt
# or: pip install ojhunt

Run directly from a clone (no install needed):

git clone https://github.com/Liu233w/ojhunt-lite
cd ojhunt-lite
uv run ojhunt tourist@codeforces

Run via container (no Python needed):

docker run --rm ghcr.io/liu233w/ojhunt-lite tourist@codeforces

Example output:

$ ojhunt tourist@codeforces tourist@atcoder
Querying CodeForces...
Querying AtCoder...
AtCoder done (1051 solved, 1.25s)
CodeForces done (2962 solved, 2.78s)

Total: 2962 solved / 6437 submissions

┏━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Crawler     Username  Solved  Submissions  Status     ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ CodeForces  tourist     2962         5386  OK (2.78s) │
│ AtCoder     tourist     1051         1051  OK (1.25s) │
└────────────┴──────────┴────────┴─────────────┴────────────┘
Completed: 2 OK, 0 failed (2.78s total)

Full CLI reference, login-required crawlers, and JSON output: docs/cli.md

Web Interface

The web interface is designed to be self-hosted. Clone the repo and deploy:

git clone https://github.com/Liu233w/ojhunt-lite
cd ojhunt-lite
uv sync
uv run fastapi run src/ojhunt/web/app.py --port 8080

Container images are available at ghcr.io/liu233w/ojhunt-lite — see docs/web.md.

Use Crawlers in Your Code

Add ojhunt as a project dependency:

uv add ojhunt
# or: pip install ojhunt

Then import crawlers directly:

import asyncio, aiohttp
from ojhunt.crawlers.codeforces import query

async def main():
    async with aiohttp.ClientSession() as session:
        result = await query(session, "tourist")
        print(result["solved"], result["submissions"], result["solved_list"])

asyncio.run(main())

Supported Platforms

See the src/ojhunt/crawlers/ directory. Archived crawlers (dead sites) are in archived_crawlers/.

Development

Adding crawlers, running tests, templates: docs/development.md

License

BSD 2-Clause License — see individual crawler files for full license text.

Credits

Lightweight Python rewrite of OJHunt (acm-statistics), originally inspired by 西北工业大学ACM查询系统 (npuacm.info) by Jiduo Zhang.

Special thanks to test account providers: @leoloveacm, @2013300262

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

ojhunt-2026.4.6.131016.tar.gz (414.5 kB view details)

Uploaded Source

Built Distribution

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

ojhunt-2026.4.6.131016-py3-none-any.whl (276.0 kB view details)

Uploaded Python 3

File details

Details for the file ojhunt-2026.4.6.131016.tar.gz.

File metadata

  • Download URL: ojhunt-2026.4.6.131016.tar.gz
  • Upload date:
  • Size: 414.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ojhunt-2026.4.6.131016.tar.gz
Algorithm Hash digest
SHA256 df5354bf2ec4cdea20cacc5c77872b4e18cba7700540306ad7c41ee9b3f24ded
MD5 4f2d3ff13de3bdf7923241985b12f9e8
BLAKE2b-256 f523b4a9a7700a5dab46bb99a3bc08b73dc803e0bb71722bb5ad879bf1d80c28

See more details on using hashes here.

Provenance

The following attestation bundles were made for ojhunt-2026.4.6.131016.tar.gz:

Publisher: release.yml on Liu233w/ojhunt-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ojhunt-2026.4.6.131016-py3-none-any.whl.

File metadata

File hashes

Hashes for ojhunt-2026.4.6.131016-py3-none-any.whl
Algorithm Hash digest
SHA256 e313b8264a124a3a7fbcf6e50e2641e94300bca1957eae9214c96b1e413d9931
MD5 0ccf9750913713d572a68ed8cf236970
BLAKE2b-256 32d28be8804cba35ffbb4b77530e3f1d15c0321597a3a46b22e2e3167c27cc13

See more details on using hashes here.

Provenance

The following attestation bundles were made for ojhunt-2026.4.6.131016-py3-none-any.whl:

Publisher: release.yml on Liu233w/ojhunt-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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