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.1.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.1-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywebflx-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 10b9a9f324829262ca0835160b63e20368d4dbd0b87b6d2621fed76cf23efd40
MD5 b0f0dde19dee973cc89d7b31a415b7f7
BLAKE2b-256 12ab2d0dd9d2e8474a9a38315a5d7b23e1010b75bd4bfb1b23e9b8113815d355

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywebflx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7842346f6a02690a81e83e2ac7314ad8abb6409f13bf2dc3500116787738e5ea
MD5 e00f80b9bdbe4a94d7dc01e6e4cdc1ca
BLAKE2b-256 089685755b6ba13bfe726b9cc9b21bc06f300055f370f20e97b3f117d5adc852

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