Skip to main content

Btime Framework

Project description

1° - Instale a lib: pip install Btime_framework

2° - Exemplos de inicio (copia e modifica no seu código):

import btime_framework as BT
from btime_framework import By  # Opcional

class Framework:
    def __init__(self):
        self.sys = BT.System()  # Classe para opções que envolvem sistema (pdf, janelas, arquivos...)
        self.instance = BT.Instancedriver(Browser="Chrome")  # Essa é a instância do navegador, classe mestre
        self.options = self.instance.initialize_options()
        self.driver = None
        self.EL= None

    def inicialize_driver(self):

        # Caso queria adicionar argumentos específicos (antes de iniciar o driver)
        self.instance.arguments.add_new_argument('--disable-blink-features=AutomationControlled')  
        # self.instance.arguments.add_new_argument

        # O driver já vem com argumentos padrões para evitar detecções e bugs
        self.driver = self.instance.initialize_driver(maximize=True)

        # Essa é a classe que agrupa todas as formas de detecção de elementos
        self.EL = self.instance.elements

class Scrapping_or_another_application(Framework):
    def __init__(self):
        super().__init__()
        self.inicialize_driver()

    def run(self):
        self.driver.get('https://www.google.com/')

        self.EL.find_element_with_wait(By.ID, 'APjFqb').send_keys('Example')
        self.EL.find_element_with_wait(By.XPATH, '//div[*[1][self::center]]//input[@value="Estou com sorte"]').click()
        # ...

if __name__ == "__main__":
    bot = Scrapping_or_another_application()
    bot.run()

3° - O framework usa diversas libs e importa dinamicamente, para importar as libs basta usar os comandos abaixo:

CMD

  • cd C:\Users\SeuUsuario\Documents\SeuProjeto
  • bt -fi SeuArquivo.py

Nisso ele vai te retornar todos os imports que você precisa

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

btime_framework-0.1.9.4b1.tar.gz (67.5 kB view details)

Uploaded Source

Built Distribution

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

btime_framework-0.1.9.4b1-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file btime_framework-0.1.9.4b1.tar.gz.

File metadata

  • Download URL: btime_framework-0.1.9.4b1.tar.gz
  • Upload date:
  • Size: 67.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for btime_framework-0.1.9.4b1.tar.gz
Algorithm Hash digest
SHA256 e9a9ae542def06b15a72d2c61a1474c4d6b910183b3cae0a1ea2b8f80b0ca3ec
MD5 66935c1a5a52aa60abb64f3b1d6ff875
BLAKE2b-256 1503e50df4d4a3d6f6cc485200bd0b14bbb8cf20948db215d2c815b23d7336d2

See more details on using hashes here.

File details

Details for the file btime_framework-0.1.9.4b1-py3-none-any.whl.

File metadata

File hashes

Hashes for btime_framework-0.1.9.4b1-py3-none-any.whl
Algorithm Hash digest
SHA256 c92bea79047fab41912d777efd94baa9352b0471c9f4cbad52a075e233878375
MD5 13b96d5f015da7d6286d74d43a1ffabf
BLAKE2b-256 4b0ec4a03ba9b42b6e73f1d99e553f4b4d772e906261881675e50dbd2c3d8053

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