Skip to main content

Automate online browsing using python and AI

Project description

PyBA - Python Browser Automations

This is a browser automation software written in python. It can visit any website, automate testing, repetitive tasks, form filling and more.

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), online shopping, form filling 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.

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

  • 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)
  • Set handle_dependencies to True if you're running this for the first time and install the playwright browsers and other dependencies by following the instructions.

  • Run the sync endpoint using engine.sync_run()

engine.sync_run(prompt="open instagram", automated_login_sites=["instagram"])

You can set the automated_login_sites argument as whichever website you want to automatially login to.

This is useful in case of OSINT when you inevitably come across a profile that is hidden behind the login wall. Setting that field will trigger the login scripts to run after it verifies the site.

If you don't want to automatically login, don't set this value. The default behavior is to not do any such thing.

  • We also have an async endpoint if you need. That can be called using just .run()

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.1.5.tar.gz (18.6 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.1.5-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_browser_automation-0.1.5.tar.gz
  • Upload date:
  • Size: 18.6 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.1.5.tar.gz
Algorithm Hash digest
SHA256 4d819e35fba9750cca2c59d834344a9dada8de1d1f82983075ceeb0e5a3fa571
MD5 348e65a09b9d8f014fe61642f87579e6
BLAKE2b-256 02547f9d8e9ae543e3d8f4c23bf158a9a6fa4d88b611267ac8c83d53b3f246cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_browser_automation-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4014e9dfcaaea2492bc7a6a9948c57ce69fd0a6538afe5a12ef96ba11cccfed6
MD5 95a76e25ec09c8f768663a358be8c32e
BLAKE2b-256 6e7bb166130b21beddfceb1b9f455ff716ae8906f49e3e296f9d91ce3f41e8fc

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