mirror of
https://git.zavage.net/Zavage-Software/wabot.git
synced 2026-07-21 04:56:09 -06:00
Reflect the final architecture (Browser facade in _browser.py, JSON session persistence, ManagedService/ExternalServer hosts, pacing policies), correct the stale "no test suite" claim now that uv + pytest (140 unit + 9 integration) + ruff + Sphinx are in place, and round out .gitignore with .venv/, .pytest_cache/, .ruff_cache/.
1.1 KiB
1.1 KiB
WABot — Web Automator Bot
Stateful Selenium browser automation for Python. Model pages as classes, drive them through one facade, and — the flagship — keep the browser alive after your process exits so another Python process can pick it up by name.
import wabot
bot = wabot.browser(session="scraper1", browser="firefox")
bot.driver.get("https://example.com/login")
# ... log in; process exits; browser stays open ...
# a different process, later:
bot = wabot.browser(session="scraper1", browser="firefox") # reattaches
Human-like pacing (random delays, randomized click positions) is on by
default; pass pacing=wabot.NoPacing() for full speed.
Development
uv sync # install everything
uv run pytest # unit tests (fast, no browsers)
uv run pytest -m integration # real headless-browser tests
uv run ruff check . && uv run ruff format --check .
uv run sphinx-build -M html docs docs/_build # docs
Docs: quickstart, persistent-sessions guide, and API reference under
docs/ (build locally with the command above).