Skip to main content

Browser automation for already-open Chrome pages via Extension + WebSocket

Project description

PyWebFlx

Automação de navegador para páginas Chrome já abertas.

PyWebFlx conecta a páginas já abertas no Chrome via uma extensão (Manifest V3) + WebSocket. Diferente do Selenium, não cria sandbox — você automatiza o navegador real.

Instalacao

pip install pywebflx
pywebflx install-extension

Quick Start

import asyncio
from pywebflx import use_browser

async def main():
    async with use_browser(url="https://quotes.toscrape.com/") as browser:
        # Inspect — entender a pagina
        print(await browser.inspect(depth=5))

        # Extrair dados
        quotes = await browser.extract_data(
            container="body",
            row=".quote",
            columns={"texto": ".text", "autor": ".author"}
        )
        for q in quotes:
            print(f"{q['autor']}: {q['texto'][:60]}...")

asyncio.run(main())

Principais funcionalidades

Metodo Descricao
use_browser() Conecta a aba por URL/titulo, abre se nao existir
click() Clica (CSS, XPath ou texto)
type_into() Digita em campos
get_text() Extrai texto de elemento
extract_data() Extrai dados estruturados (cards, listas)
extract_table() Extrai tabelas HTML com paginacao
inspect() Visao resumida do DOM (otimizado pra IA)
wait_element() Espera elemento aparecer
execute_js() Executa JavaScript na pagina

Documentacao

https://theflexa.github.io/pywebflx/

Licenca

MIT

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

pywebflx-0.1.0.tar.gz (97.5 kB view details)

Uploaded Source

Built Distribution

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

pywebflx-0.1.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file pywebflx-0.1.0.tar.gz.

File metadata

  • Download URL: pywebflx-0.1.0.tar.gz
  • Upload date:
  • Size: 97.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywebflx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c6eb7901e4cb474d2a7872d7a67e353c55d33f8c083e812687ea2bd66b88ac57
MD5 2272fc0e815e49a1cbeb7f1e380a2987
BLAKE2b-256 1c98a7bdb881ac41f6d8bb5b63409c8004edd4bc40c7bbf55e9d65400b2e743a

See more details on using hashes here.

File details

Details for the file pywebflx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pywebflx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywebflx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28409c5f6b68cb76ffeecbdd44e007e0fb01f8dc7fdc40cfbe3cd60b6526d04d
MD5 a273ec951474a1f4a349ae861a7fd608
BLAKE2b-256 27c7472a89c4841aeeafe32c890809772cd21da9444f9034dafd88e68e571788

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