Automate online browsing using python and AI
Project description
PyBA - Python Browser Automations
This is a no-code browser automation software written in python. It can visit any website, automate testing, repetitive tasks, form filling and more. This library is specifically built for more exploratory analysis than EXACT inputs (though it supports both through different modes).
Features
Trace zipfile creation to recreate the automation for playwright traceviewerLoggeranddependency managementautomatically- Creation of the
automation scriptin file once successful Local and server baseddatabase creation for holding all the actions performed- Stealth mode and config heavy files for custom bypass laws
Quick loginto social media sites without passing credentials to the LLMThreadsafe for multiple tasks in parallel.specializedextracted for sites like YouTube.
For examples on each of these features, checkout the eval directory.
If the software has helped, consider giving us a star 🌟!
Idea
This library will allow you to run an inhouse playwright instance and automate any task. These tasks can be related to web-scraping, OSINT (OpenSource INTelligence) etc.
This is built on top of playwright and it requires either VertexAI or OpenAI API keys to do the "thinking" part of the process. The library also contains support to automatically login to your social media sites (you'll have to provide a username and password! Check the the usage section for more on that) so you can use it for SOCmint or simple automated social media interactions as well.
We optionally allow you to enable tracing, the logs of which you can see on playwright's traceviewer. We also support logging and config files should you want to change any defaults
Why?
The need for such a software came when I was building a fully automated intelligence framework. The goal is to replicate everything a human can do on the internet, and automate that process. This tool will employ all sorts of anti-bot detection and anti-fingerprinting techniques (I am still learning about them...) and will make sure that nothing halts the automation.
Installation
The library can be installed via pip:
pip install py-browser-automation
or you can install it from the source:
git clone https://github.com/FauvidoTechnologies/PyBrowserAutomation/
cd PyBrowserAutomation
pip install .
Usage (quickstart)
[!NOTE] For more detailed instructions visit the docs
- Import the main engine using:
from pyba import Engine
- Set the right configurations depending on which model you want to use:
For VertexAI
engine = Engine(vertexai_project_id="", vertexai_server_location="", handle_dependencies=False)
For OpenAI
engine = Engine(openai_api_key="", handle_dependencies=False)
For Gemini (without VertexAI)
engine = Engine(gemini_api_key="")
-
Set
handle_dependenciestoTrueif you're running this for the first time and install the playwright browsers and other dependencies by following the instructions. -
Run the
syncendpoint usingengine.sync_run()
output = engine.sync_run(prompt="open my instagram, tell me who has posted what and who all have put up stories", automated_login_sites=["instagram"]) # Read about the automated login sites in the docs
print(output)
For more use cases, check out the evals direcrtory.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_browser_automation-0.2.4.tar.gz.
File metadata
- Download URL: py_browser_automation-0.2.4.tar.gz
- Upload date:
- Size: 41.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68e0f72e25d748c82f7cdcc0ed3b836900d069d0747b1e656ce1b13285f644b4
|
|
| MD5 |
f62bfd8e8c94d8ffc5d01fdd8c50aa5e
|
|
| BLAKE2b-256 |
d9727497eea5fc917cd29ffb9120092ab19ba8d79cafc66572cc45b61c28adf3
|
File details
Details for the file py_browser_automation-0.2.4-py3-none-any.whl.
File metadata
- Download URL: py_browser_automation-0.2.4-py3-none-any.whl
- Upload date:
- Size: 58.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3978218f2f331264721ac38e7328877650893e8f4c624529974e0cde75b3a21
|
|
| MD5 |
c844ba2ac7aa98446fe7f6d9564f8a8d
|
|
| BLAKE2b-256 |
fc5242c2b7568b4d0acc53899f4affc0ed78ab33084c7e08342dde9e339a3084
|