Skip to main content

Automate online browsing using python and AI

Project description

PyBA — Python Browser Automation

PyPI Downloads

PyBA (Py Browser Automation) is a no-code, LLM-powered, reproducible browser automation framework written in Python. It can visit any website, navigate interfaces autonomously, fill forms, perform OSINT tasks, automate testing, extract data, and execute complex multi-step workflows - all from a single natural-language prompt.

Built on top of Playwright, PyBA focuses on highly exploratory automations rather than precise inputs (though it supports both styles). It is designed for developers, researchers, analysts, and security engineers who want human-level browser reasoning without manually writing automation scripts.


Core Modes

PyBA provides three execution modes, each optimized for a different style of reasoning:

  • Normal Mode Deterministic navigation using exact instructions.
    Example:
    "Open Instagram, go to my DMs, and tell XYZ I'll be late for the party."

  • BFS Mode Breadth-first reasoning for tasks with multiple possible success paths.
    Example:
    "Map all possible online identities associated with the username 'vect0rshade'."

  • DFS Mode Deep, recursive exploration for investigative or research-type tasks.
    Example:
    "Analyze this user’s GitHub activity and infer their technical background."


Key Features

Trace zip generation

Automatic creation of Playwright trace files for full reproducibility in traceviewer.

Built-in logging & dependency management

Every step is logged and optionally stored in a local/server database.

Automatic script generation

Successful runs can be exported as standalone Python Playwright scripts.

Local or remote databases

Persist every action, observation, and browser state for auditing or replaying runs.

Stealth mode & anti-fingerprinting presets

Configurable behavior for bypassing common bot-detection heuristics.

Quick login to platforms

Fast social-media authentication using environment-variable credentials, without ever exposing them to the LLM.

Thread-safe

Suitable for parallel multi-task workflows.

Specialized extractors for certain platforms

(e.g., YouTube metadata, structured outputs, etc.)

For detailed examples of each feature, refer to the automation_eval/ directory.


Philosophy

PyBA originated from building a fully automated intelligence/OSINT platform designed to replicate everything a human analyst can do in a browser - but with reproducibility and speed.

Goals include:

  • Integrating LLM cognition directly into browser operations
  • Navigating complex websites like a human
  • Avoiding bot-detection halts
  • Providing standardized logs and replayability
  • Scaling from simple automations to deep investigative workflows

Installation

Install via PyPI:

pip install py-browser-automation

Or install from source:

git clone https://github.com/FauvidoTechnologies/PyBrowserAutomation
cd PyBrowserAutomation
pip install .

Quickstart

(See full documentation at: https://pyba.readthedocs.io/)

1. Initialize Engine

You can use OpenAI, VertexAI, or Gemini as the reasoning backend.

Example (OpenAI):

from pyba import Engine

engine = Engine(openai_api_key="")
output = engine.sync_run(
    prompt="open my instagram and tell me who posted what",
    automated_login_sites=["instagram"]
)
print(output)

Or generate automation code:

output = engine.sync_run(
    prompt="visit the Wikipedia page for quantum mechanics, click the first hyperlink repeatedly until you reach Philosophy, and count the steps"
)

engine.generate_code(output_path="/tmp/script.py")
print(output)

Explore more examples in automation_eval/.


If the project has helped you, consider giving it a star 🌟!

Project details


Download files

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

Source Distribution

py_browser_automation-0.2.6.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

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

py_browser_automation-0.2.6-py3-none-any.whl (72.0 kB view details)

Uploaded Python 3

File details

Details for the file py_browser_automation-0.2.6.tar.gz.

File metadata

  • Download URL: py_browser_automation-0.2.6.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for py_browser_automation-0.2.6.tar.gz
Algorithm Hash digest
SHA256 3567a3b5b4cd1f70cc3413080b55e50e85a67bad7195e301273b8b8293f6d80a
MD5 3fd423286ab698d8aae2ff61c2d26076
BLAKE2b-256 0195c36c38870b9113425510f8d8804f9e1e5d9a76a8743cd6c28faee0948a4e

See more details on using hashes here.

File details

Details for the file py_browser_automation-0.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for py_browser_automation-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4d0ec6051dd9b1d7c1dc5d7ebb142e4d68154dc90c3b2c6a0501bcc350dced95
MD5 8e9fa1e5444ed28b3c2eae912f7ea4e6
BLAKE2b-256 a1d7a2ce4b3443fa3fa906bc7bf6208118564ffbec2dd323253658f02124c289

See more details on using hashes here.

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