Metadata-Version: 2.5
Name: talosbrowser
Version: 0.2.0
Summary: Browser automation for scraping and verification: JSON recipes with a deterministic runtime, an extraction ladder (optional LLM), text captcha solving, a shared browser/HTTP session and verifiable evidence.
Project-URL: Homepage, https://github.com/talos-browser/talosbrowser
Project-URL: Repository, https://github.com/talos-browser/talosbrowser
Project-URL: Issues, https://github.com/talos-browser/talosbrowser/issues
Project-URL: Changelog, https://github.com/talos-browser/talosbrowser/blob/main/CHANGELOG.md
Author-email: Cristian Camilo Robledo Cuellar <cristiancamilorobledo@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: automation,browser-automation,captcha,evidence,playwright,recipes,verification,web-scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: cryptography>=42.0
Requires-Dist: playwright<1.66,>=1.61
Requires-Dist: pydantic>=2.6
Provides-Extra: all
Requires-Dist: anthropic>=2.1; extra == 'all'
Requires-Dist: brotli>=1.2; extra == 'all'
Requires-Dist: curl-cffi>=0.7; extra == 'all'
Requires-Dist: httpx>=0.27; extra == 'all'
Requires-Dist: lxml>=5.0; extra == 'all'
Requires-Dist: markdownify>=0.13; extra == 'all'
Requires-Dist: numpy>=1.26; extra == 'all'
Requires-Dist: onnxruntime>=1.16; extra == 'all'
Requires-Dist: openai>=1.40; extra == 'all'
Requires-Dist: opencv-python-headless>=4.9; extra == 'all'
Requires-Dist: psutil>=5.9; extra == 'all'
Requires-Dist: pypdf>=6.19.0; extra == 'all'
Requires-Dist: pytesseract>=0.3.10; extra == 'all'
Requires-Dist: selectolax>=0.3.21; extra == 'all'
Requires-Dist: trafilatura<3,>=1.9; extra == 'all'
Requires-Dist: zstandard>=0.22; (python_version < '3.14') and extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=2.1; extra == 'anthropic'
Provides-Extra: batch
Requires-Dist: httpx>=0.27; extra == 'batch'
Requires-Dist: psutil>=5.9; extra == 'batch'
Provides-Extra: detector
Requires-Dist: numpy>=1.26; extra == 'detector'
Requires-Dist: onnxruntime>=1.16; extra == 'detector'
Requires-Dist: opencv-python-headless>=4.9; extra == 'detector'
Provides-Extra: dev
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: pillow>=10.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: pdoc>=16; extra == 'docs'
Provides-Extra: fast
Requires-Dist: brotli>=1.2; extra == 'fast'
Requires-Dist: curl-cffi>=0.7; extra == 'fast'
Requires-Dist: httpx>=0.27; extra == 'fast'
Requires-Dist: lxml>=5.0; extra == 'fast'
Requires-Dist: selectolax>=0.3.21; extra == 'fast'
Requires-Dist: zstandard>=0.22; (python_version < '3.14') and extra == 'fast'
Provides-Extra: mcp
Requires-Dist: mcp>=1.9; extra == 'mcp'
Provides-Extra: ocr
Requires-Dist: numpy>=1.26; extra == 'ocr'
Requires-Dist: opencv-python-headless>=4.9; extra == 'ocr'
Requires-Dist: pytesseract>=0.3.10; extra == 'ocr'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.20; extra == 'otel'
Provides-Extra: pdf
Requires-Dist: pypdf>=6.19.0; extra == 'pdf'
Provides-Extra: read
Requires-Dist: markdownify>=0.13; extra == 'read'
Requires-Dist: trafilatura<3,>=1.9; extra == 'read'
Provides-Extra: service
Requires-Dist: httpx>=0.27; extra == 'service'
Provides-Extra: tsa
Requires-Dist: rfc3161-client>=1.0.6; extra == 'tsa'
Provides-Extra: vision
Requires-Dist: openai>=1.40; extra == 'vision'
Provides-Extra: warc
Requires-Dist: warcio>=1.8; extra == 'warc'
Description-Content-Type: text/markdown

<div align="center">

<img src="https://raw.githubusercontent.com/Talos-Browser/talosbrowser/v0.2.0/.github/assets/logo.svg" alt="TalosBrowser logo" width="112">

# TalosBrowser

**Build a web task once, then run it again and again — without an LLM, with proof of what was seen.**

[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](#install)
[![Version 0.2.0](https://img.shields.io/badge/version-0.2.0-informational.svg)](CHANGELOG.md)
[![Windows | Linux](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-lightgrey.svg)](#install)

[What it does](#what-it-does) · [Install](#install) · [Quick start](#quick-start) · [Recipes](#recipes-in-30-seconds) · [Responsible use](#responsible-use) · [Documentation](#documentation) · [Español](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/README.es.md)

</div>

Python library (3.10+, Windows and Linux) for **repeatable, verifiable web automation**: sign in with your own account,
fill a form, read the result and keep proof of what was seen. It drives standard Chromium through Playwright (or
patchright, if installed) and adds a control layer on top. It is not a recompiled Chromium. It is for developers who run the
same web query again and again (portals, forms, accounts of their own) and need it to keep working when the site changes,
without paying for an LLM on every run.

The core idea is the **recipe**: a JSON file with the steps of a query. You build it once, by hand or with an LLM agent;
after that it runs with no LLM, repairs itself when the site changes and, when possible, skips the browser and goes over
plain HTTP.

## What it does

| To... | Talos has | Measured |
|---|---|---|
| Read a page as Markdown | `Talos().read(url)`: HTTP first, Chromium only if the page needs it | 2.0 s over HTTP on a public site; optional noise pruning (`read_denoise`) cuts leftover noise from 0.153 to 0.021 at the same recall |
| Repeat a query on a web portal: sign in, fill, submit, read | JSON recipes with a deterministic runtime that needs no LLM | 11 of 11 integration cases (local server, real Chromium) pass with curl_cffi and with httpx; the script that runs them is not published |
| Build the recipe | By hand (`talos record`) or with an LLM agent (`talos explore`) | `explore`: 27 of 27 good recipes with two cheap models on 9 own synthetic portals; `record`: 8 of 8 |
| Survive site changes | Self-repair without an LLM (fingerprints of steps, fields, lists, iframes), and with one if available | Changed texts or structure: 100 %. Renamed ids: 89 % with the fingerprint alone, 60 of 60 on the iframe cases with `heal_frame`. All three changes at once: 0 %, because it abstains instead of guessing |
| Several accounts of your own | One persistent, locked profile per account; a single sign-in per account even from many threads or processes; keep-alive | 4 threads, 1 sign-in, 4 of 4 with the data; multi-account Docker with a sealed profile ([guide](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/docker-multicuenta.md)) |
| Move a session between browser and HTTP | `TalosSession`, `LiveSession`, scoped cookies, federated renewal | 4 of the 11 integration cases above (same unpublished script) |
| Go faster, spend less | Learned HTTP path (no browser), embedded JSON, cache, browser models that share processes | Fast path 7-14x faster against a local server with 100 ms latency; 8 accounts at once in 679 MB with `browser_model="shared"` vs 1635 MB |
| Let a person take over | Human handoff: a person drives the account's browser from a local page, also in Docker | Tests with real Chromium and a local portal |
| Prove what was seen | sha256 per query, signed chain, RFC 3161 timestamp and WARC | `talos verify-evidence` detects a deleted or edited entry |
| Hand it to an agent (Claude, etc.) | MCP server over stdio, read-only by default (`--allow-write` enables write recipes), SSRF guard on by default | A real MCP client against the server |

Figures come from the scripts in [`bench/`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/bench/README.md) and from runs whose raw model transcripts are not published;
the repository keeps the aggregate results. Timings were taken on a Ryzen 9 9900X (Zen 5), 96 GB, Windows, with other
loads running on the machine: they are indicative.

**What it does not do, or was not measured:**

- It does not write a scraper by itself for any site. The `explore` agent does well on form-based portals (the 9
  synthetic ones) and poorly on real public sites: two models solved 2 and 7 of 30 WebVoyager tasks (one figure per model).
- It does not invent. A value it cannot find is `None`, an unsolved captcha never counts as success, and self-repair
  abstains when there is no clear winner. Without an LLM it does not survive a full redesign (ids, classes and texts all
  changed at once).
- Not measured: macOS; the reCAPTCHA image grid; real OCR; interactive `login`; moving a profile to another machine.
- Known security limit: with `seal_profile` (non-Windows only; on Windows DPAPI already protects the cookies) the profile is encrypted on disk, but in the clear in RAM while the browser
  runs.

Almost everything is opt-in, and "off" behaves exactly as before the option existed. Every option is documented in
[`docs/opciones.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/opciones.md).

## Install

```bash
pip install "talosbrowser[fast,read]"
playwright install chromium        # once; needed only for browser routes (recipes, JS-built pages)
```

Extras: `[fast]` (HTTP client with Chrome-like TLS, fast path), `[read]` (page to Markdown), `[vision]` (any
OpenAI-compatible model), `[anthropic]`, `[ocr]`, `[detector]`, `[service]`, `[pdf]`, `[batch]`; `[all]` installs all of those; separate: `[mcp]`, `[tsa]`, `[warc]`,
`[otel]`, `[docs]` (API reference) and `[dev]` (tests). Without `[fast,read]`, `read()` has nothing to convert HTML with: it
returns `empty=True` and `meta["hint"]` says what to install. On Windows, create the virtualenv in a short path
(e.g. `C:\envs\talos`) if `pip` fails on a long Playwright path.

**OCR for scanned PDFs.** Talos takes any OCR through the `ocr=` seam. To use [LegereOCR](https://github.com/legere-ocr-full/legereocr)
(same author, Apache-2.0), install it from PyPI:
`pip install legereocr`, and then `Talos(ocr=LegereOcr())` (`from talos import LegereOcr`).
`talos.ocr_legere.default_ocr()` returns `None` when it is not installed.

## Quick start

```python
from talos import Talos

r = Talos().read("https://quotes.toscrape.com/")    # HTTP first; Chromium only if the page needs it
print(r.ok, r.meta["path"], r.markdown[:80])         # True http ...
```

## Recipes in 30 seconds

```python
from talos import Talos, Recipe, RecipeRunner

receta = Recipe("citas", start_url="https://quotes.toscrape.com/")
receta.goto(url="{start_url}")
receta.add_step("extract")
receta.add_field("primera_cita", selector=".quote .text")
receta.add_field("autores", selector=".quote .author", many=True)

res = RecipeRunner(Talos()).run(receta)
print(res.ok, res.data["primera_cita"][:40], len(res.data["autores"]))   # True ... 10
receta.save("citas.json")          # a recipe is plain JSON: version it
```

Run it again from the command line, or let a person or an agent write one for you:

```bash
talos run citas.json
talos record https://my-portal.example "lookup" --out recipe.json   # you do the query by hand once
talos explore https://my-portal.example "find the record for {id}" --param id=1234567   # an LLM agent emits the recipe
```

`explore` needs a model: set `TALOS_MODEL`, `TALOS_BASE_URL` and `TALOS_API_KEY` for any OpenAI-compatible endpoint, or
`TALOS_PROVIDER=anthropic` for Anthropic.

More recipes (loops, popups, downloads, login, human handoff, HTTP-only, asyncio) are in the
[usage guide](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/GUIA.md) (in Spanish).

## Responsible use

Talos includes features that make an automated Chromium look like an ordinary one: `Config.stealth()` (a coherent
per-identity browser fingerprint, `spoof_fingerprint`, and human-like mouse movement, `humanize`), proxy support, and a
fast-path HTTP client (`[fast]`) that sends a Chrome-like TLS fingerprint. They exist so that portals that block
automated browsers still work for legitimate use with your own account or on sites where you have permission. They are
**off by default** (`Config()` enables none of them) and are not meant to break security protections.

- On a rate limit Talos waits for what the server asks (`Retry-After`); it does not rotate IPs, proxies or accounts to get
  around it.
- Captchas: ask a person first. Human handoff lets someone solve a challenge in the account's own browser. The automatic
  solvers (text OCR, vision model, solver services) are opt-in and meant for sites where you are allowed to use them.
  The reCAPTCHA v2 checkbox support was only measured with Google's public test key.
- If the site is yours, `Config.site_cookies` sends a secret cookie that your WAF or backend can recognize
  ([guide](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/docker-multicuenta.md)).
- Respect each site's terms of use, `robots.txt` and the laws that apply to you, including data-protection laws. You are
  responsible for what you automate.

## Documentation

- [`docs/GUIA.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/GUIA.md): usage guide (Spanish; the guides under `docs/` are in Spanish): API, recipes, sessions, human handoff, Docker, CLI, configuration.
- [`docs/DISENO.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/DISENO.md): how it is built.
- [`docs/opciones.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/opciones.md) and [`docs/configurables.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/configurables.md): every option.
- [`docs/docker-multicuenta.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/docs/docker-multicuenta.md): several accounts in Docker.
- [`bench/README.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/bench/README.md): benchmarks behind the numbers above.
- [`SECURITY.md`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/SECURITY.md): how to report a vulnerability.

## Author

Created and maintained by **Cristian Camilo Robledo Cuellar** · [soft-solutions.org](https://soft-solutions.org) · cristiancamilorobledo@gmail.com

Need web automation built for your own portals and accounts? I build custom software and do consulting: get in touch through the website or by email.

## License

Apache-2.0, see [`LICENSE`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/LICENSE) and [`NOTICE`](https://github.com/Talos-Browser/talosbrowser/blob/v0.2.0/NOTICE). © 2026 Cristian Camilo Robledo Cuellar.
