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.2.tar.gz (97.2 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.2-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywebflx-0.1.2.tar.gz
  • Upload date:
  • Size: 97.2 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.2.tar.gz
Algorithm Hash digest
SHA256 7b842f01933ff3b06906fc712893a6a4a95178bdd09ab3662361c7a903226fea
MD5 dd6d0ce8aa4b5f40fe3bffd8433809bf
BLAKE2b-256 f1b1c572a08686187009a9c537cee0f737163e227d2336327c6c6a486d6a1023

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywebflx-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bee247a106f36c89a6a01d53eb56772a4d2a21b4307edc5fbf43f684c91923e
MD5 9d4f89f48f848359d91cb00f566b78f2
BLAKE2b-256 a2a09c7cefe7f8093fe436f0579a2d25fd45f0c35ae87ff4efa0d9951400463d

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