Takes a CSV of Peruvian DNIs or RUCs and looks each one up on public government sites. Returns registered phone lines, taxpayer identity records, legal representatives, and carrier debt.
mise install # install toolchain
mise run install # uv sync
cp .env.example .env # then fill in proxy credentials
uv run --env-file .env fetch --input docs.csv --output out.csv --sites osiptelThe fetch, browser, and portal packages need proxy credentials in .env;
capture does not. See docs/proxies.md for vendor setup.
Other tasks, all from the repo root:
mise run format # ruff format + ruff check --fix
mise run check # mypy across workspace
mise run test # pytest all packages
mise run build # PyInstaller binary for fetch
mise run dev # postgres + portal web (Ctrl+C stops everything)
mise run reset # wipe local postgres; next `mise run dev` starts cleanThis is a
uv workspace with
four packages. fetch makes HTTP requests through
proxies and is the workhorse; browser drives
Chrome over the DevTools protocol for sites that need JS, reCAPTCHA, or similar;
capture reverse-engineers a site using your own
Chrome browser; portal is the web UI for managing
fetch jobs, auth, teams, and results. A new site typically starts in capture
(discover the request), moves to browser (automate it), then lands in fetch
(run it unattended). Each package keeps its own copy of a site's parser and
columns rather than sharing code; see
docs/architecture.md for why.
Results land in results/ (gitignored). State is stored in SQLite
(*.state.sqlite3), which is the source of truth; see
docs/architecture.md for the job lifecycle, resume
behavior, and how state works.
- fetch, if you're running a job for the first time
- docs/troubleshooting.md, if you're debugging a job failure, then docs/sites/ for the specific site
- docs/adding-a-site.md, if you're adding a new site
- portal, if you're running the web UI
- docs/architecture.md, if you're reviewing code or want to understand the whole system before picking a package